Cannot determine embedded database driver class for database type NONE - SpringBoot

When we create Spring boot starter web project in STS and selected Apache Derby (Any Embeded Database) while creating project and on running project as Run as Java Application  it may give following

Error:-



***************************
APPLICATION FAILED TO START
***************************

Description:

Cannot determine embedded database driver class for database type NONE

Action:

If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).


Solution:

We have to add following annotation

@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})

to the class having main() method.

Need to import following:

import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;

Comments

Popular posts from this blog

How to get context path in JQuery?

How to extend Liferay 6.2 session timeout by AJAX call?