Google News
logo
Java Spring Boot - Interview Questions
What is the error you see if H2 is not in the classpath?
If H2 is not present in the classpath, then you see the following error :
 
Cannot determine embedded database driver class for database type NONE
 
To resolve this error, add H2 to the pom.xml file, and restart your server.

The following code snippet can be added to add the dependency :
 
<dependency>
    <groupId>com.h2database</groupId>
    <artifactId>h2</artifactId>
    <scope>runtime</scope>
</dependency>

 

Advertisement