Cannot Determine Embedded Database Driver Class For Database Type None
- Cannot Determine Embedded Database Driver Class For Database Type None Type
- Description Cannot Determine Embedded Database Driver Class For Database Type None Action
- Cannot Determine Embedded Database Driver Class For Database Type None Oracle
This is the error that is thrown when trying to run my web app:
I believe I have the right combination of datanucleus-appengine
and datanucleus
jars:
If you are using Spring Boot and getting errors like 'Cannot determine embedded database driver class for database type NONE' or 'Error creating a bean with name 'dataSource' defined in class path. INFO org.springframework.beans.factory.BeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a.
2.1: Requires DataNucleus 3.1.x (core, api-jdo, api-jpa, enhancer). Requires SDK 1.6.4+ Note that this release of Datanucleus is no longer
supported by the DataNucleus project
JPA App Config:
Application.java
POM:
I wonder what could be missing in my app? I followed the instruction from here Using Spring Data JPA on Google Appengine
You haven’t provided Spring Boot with enough information to auto-configure a DataSource
. To do so, you’ll need to add some properties to application.properties
with the spring.datasource
prefix. Take a look at DataSourceProperties to see all of the properties that you can set.
You’ll need to provide the appropriate url and driver class name:
I solved this by adding the following to my pom file.
I’d the same problem and excluding the DataSourceAutoConfiguration solved the problem.
This worked for me (1.3.0.M5) :
Exclude both classes.

It did not work with
Now that I look closer, I think that the DataSource problem is a red-herring. Boot’s Hibernate auto-configuration is being triggered and that’s what causing a DataSource to be required. Hibernate’s on the classpath because you’ve got a dependency on spring-boot-starter-data-jpa
which pulls in hibernate-entitymanager
.
Update your spring-boot-starter-data-jpa
dependency to exclude Hibernate:
From the Spring manual (http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-sql.html#boot-features-embedded-database-support):
Spring Boot can auto-configure embedded H2, HSQL and Derby databases. You don’t need to provide any connection URLs, simply include a build dependency to the embedded database that you want to use.
For example, typical POM dependencies would be:
For me leaving out the spring-boot-starter-data-jpa dependency and just using the spring-boot-starter-jdbc dependency worked like a charm, as long as I had h2 (or hsqldb) included as dependencies.
I don’t if it is too late to answer.
I could solve this issue by excluding DataSourceAutoConfiguration from spring boot.
Spring boot will look for datasoure properties in application.properties file.
Please define it in application.properties or yml file
application.properties
If you need your own configuration you could set your own profile and use the datasource values while bean creation.
you can add spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
to your properties file
I had two dependencies with groupId of org.springframework.data, then I removed jpa and kept mongodb only , and it worked!
Doing below works.
But If I wanted to have dataSource, I should not do the above configuration.
The below link says that we need to all the properties in application.properties file. All the properties should start withspring.datasource.*
I got the error message in the title from o.s.b.d.LoggingFailureAnalysisReporter
along with the message “APPLICATION FAILED TO START”. It turned out that I hadn’t added -Dspring.profiles.active=dev
to my Eclipse debug configuration so I had no active profile.
In my case , I put it a maven dependency for org.jasig.cas in my pom that triggered a hibernate dependency and that caused Spring Boot to look for a datasource to auto-configure hibernate persistence.
I solved it by adding the com.h2database maven dependency as suggested by user672009. Thanks guys!
As this is one of the first topics returned in google for this error, I’ll post what I did in case someone face the same issue..
I didn’t want to exclude DataSourceAutoConfiguration
neither use a memory database..
In my case I was setting the parameters as the other repliers said but the application.properties
file was inside the wrong folder.. lol
So in case nothing like this works, check if the file is inside src/main/resources
! In my case it was inside src/main/resources/static
Answer is very simple, SpringBoot will look for Embeddable database driver, If you didn’t configure in any of your configuration in form of XML or Annotations, it will throws this exception.
Make the changes in your annotation like this
this will exclude the DataSourceAutoConfiguration.
And the Perfect Simple Coding completion would be work if you have properly configured your class.
I solve my problem just adding @AutoConfigureTestDatabase(replace=Replace.NONE)
I faced this exception while I was doing APIs for ElasticSearch using Spring Data. I did the following and it worked.
I too faced the same issue.
In my case deleting the jar file from repository corresponding to the database fixes the issue. There was corrupted jar present in the repository which was causing the issue.
You can download the derby-10.10.1.1.jar from the Maven Repository and place it in your WEB-INF/lib folder, like this Application/WEB-INF/lib/derby-10.10.1.1.jar.
Your embedded AnnotationConfigEmbeddedWebApplicationContext will pickup the database driver and your webserver will start running without any issues 🙂
If you are using Gradle, include right jar of driver as below:
Or if using Maven then do it in Maven style, it should solve your problem.
To anybody coming to this thread after hours of banging your head against a wall. I solved this error by changing
Cannot Determine Embedded Database Driver Class For Database Type None Type
to
Description Cannot Determine Embedded Database Driver Class For Database Type None Action
in my schema.sql file in the resources directory.

If you really need 'spring-boot-starter-data-jpa' as your project dependency and at the same time you don't want to allow your app to access any database, you can simply exclude auto-configuration classes
I was facing this issue even after supplying all required datasource properties in application.properties. Then I realized that properties configuration class was not getting scanned by Spring boot because it was in different package hierarchy compared to my Spring boot Application.java and hence no properties were applied to datasource object. I changed the package name of my properties configuration class and it started working.
https://stackoverflow.com/a/42368525/7598936
Tags: class, database, spring
点击run启动后报错如下:
这是因为spring boot默认会加载org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration类,DataSourceAutoConfiguration类使用了@Configuration注解向spring注入了dataSource bean。因为工程中没有关于dataSource相关的配置信息,当spring创建dataSource bean因缺少相关的信息就会报错。
因为我仅仅只是使用spring boot来写一些很简单的例子来学习它,在Application类上增加@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
阻止spring boot自动注入dataSource bean
这样就可以正常启动啦!
.
springboot启动报错:Cannot determine embedded database driver class for database type NONE.的更多相关文章
- Springboot 之 启动报错-Cannot determine embedded database driver class for database type NONE
Springboot 之 启动报错-数据库 springboot项目在启动时,报如下错误: Error starting ApplicationContext. To display the auto ...
- SpringBoot项目报错Cannot determine embedded database driver class for database type NONE
原因: Cannot determine embedded database driver class for database type NONE 这是因为spring boot默认会加载org.s ...
- SpringBoot启动报错Failed to determine a suitable driver class
SpringBoot启动报错如下 Error starting ApplicationContext. To display the conditions report re-run your app ...
- springboot 启动报错"No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available"
1.问题 springboot启动报错 'D:Program FilesJavajdk-11binjava.exe' -XX:TieredStopAtLevel=1 -n ...
- 报错Cannot determine embedded database driver class for database type NONE解决方法
由于我不需要数据库,启动springboot报错: Cannot determine embedded database driver class for database type NONE If ...
- Eureka 客户端启动报错误 Cannot determine embedded database driver class for database type NONE
用这种数据库配置就是死活连不上数据库 提示:Cannot determine embedded database driver class for database type NONE 解决方式: 启 ...
- springboot启动报错:Failed to configure a DataSource
一.背景 springboot的出现,让项目搭建变得更方便快捷,同时简化掉很多的样板化配置代码,提高开发效率. 通过idea生成springboot项目,启动报错:Failed to configur ...
- 《Springboot极简教程》问题解决:Springboot启动报错 Whitelabel Error Page: This application has no explicit mapping for(转)
13.2 Spring Boot启动报错:Whitelabel Error Page 13.2 Spring Boot启动报错:Whitelabel Error Page 问题描述 Whitelabe ...
- springboot启动报错:Could not resolve placeholder
SpringBoot1.5,项目启动报错: Could not resolve placeholder 很明显是找不到配置文件引起的,查看配置文件目录结构如下: 很正常呀. 完全可以加载applica ...
Cannot Determine Embedded Database Driver Class For Database Type None Oracle
随机推荐
- wine install 32bit netframewok
WINEARCH=win32 WINEPREFIX=~/.wine32 winecfg env WINEARCH=win32 WINEPREFIX=~/.wine32 winetricks dotne ...
- appcan weixin 开发
登录微信开放平台:https://open.weixin.qq.com/ 管理中心,创建移动应用,ps:创建应用需要审核,其中 应用包名 需与在线打包安卓时候的 自定义包名一致. 开放平台 应用申请 ...
- ili9341 横屏驱动代码
void ili9341_Initializtion(void) { u16 i; RCC->APB2ENR|=<<; //使能PORTB时钟 GPIOB->CRH&= ...
- FIREDAC TFDCONNECTION连接MYSQL数据库
FIREDAC TFDCONNECTION连接MYSQL数据库 procedure TfrmDB.ConnectDB;begin FDMoniFlatFileClientLink1.FileName ...
- oracle 计算两个时间之间的月份差,相差几个星期,相差多少天
相差多少天: sysdate-to_date('1991-01-01','YYYY-MM-DD'))<7 and (sysdate-to_date('1991=01=01','YYYY-MM ...
- Dapper的数据库连接管理(打开、关闭)
Dapper对于数据库连接的管理:如果已经打开,它会关闭连接.如果你只是做一个快速查询-让Dopter自己处理它. 如果你做了很多事情,你应该自己打开连接,并在最后关闭连接,所有的查询在中…只是从效率 ...
- css样式重置样式
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, ci ...
- 【PowerDesigner】【2】将工具栏显示出来
问题:我的软件一打开,没有工具栏 解决方案:Tools→Customize Menus and Tools→Palette→Close 参考文档: PowerDesigner如何将消失的工具栏显示出来 ...
- P2412高精度减法
传送门 因为忘了带书回家,所以因为这道题我卡了半小时所以写篇博客“纪念”下 高精度减法中,如果被减数比减数小,就要用减数减去被减数.接下来的判断就是本题的核心.直接用strcmp是不行的,例如100与 ...
- MathType中输入破折号的教程
MathType公式编辑器中的包含的各种数学符号与模板已经足够我们在编辑公式时使用了,但是除此之外,MathType还有一些符号并不是数学专有的符号,但是在数学中也偶尔会用到,比如破折号.MathTy ...
