• Register
0 votes

Problem :

This is the error that is thrown when trying to run my web app:

[INFO] WARNING: Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Injection of autowired dependencies failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Could not autowire field: private javax.sql.DataSource 
org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.dataSource; nested exception is org.springframework.beans.factory.BeanCreationException: Error
 creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration
$NonEmbeddedConfiguration.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method
 [public javax.sql.DataSource org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration$NonEmbeddedConfiguration.dataSource()] threw exception; nested
 exception is org.springframework.beans.factory.BeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded
 database please put a supported one on the classpath.:


I know I have the correct combination of the datanucleus-appengine and datanucleus jars:

2.1: Requires DataNucleus 3.1.x (core, api-jdo, api-jpa, enhancer) and  Requires SDK 1.6.4+ Note that this release of the Datanucleus is no longer supported by your DataNucleus project


I don’t know what is missing in my app?

6 5 3
7,540 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I think you have not provided the Spring Boot with the enough information to auto-configure the DataSource. To do so, you will just need to add some more properties to your application.properties with your spring.datasource prefix. Please have a look at the DataSourceProperties to see all of the required properties that you must set.

Also you will need to provide the correct url and the driver class name as below :

spring.datasource.url = …
spring.datasource.driver-class-name = …


9 7 4
38,600 points

Related questions

0 votes
2 answers 341 views
Problem : I want to run the spring-boot application which uses thre hibernate via spring-jpa, but i am facing below error: Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo ... .AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:345) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:308)
asked Jan 3, 2020 alecxe 7.5k points
0 votes
1 answer 1.8K views
Problem : I am a completely novice in the hibernate world and facing below error, WARN: GenerationTarget encountered exception accepting command : Error executing DDL via JDBC Statement org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement The ... hibernate 4 version all my code runs very well. I looked for many solutions but they are not working for me.
asked Feb 4, 2020 jwilliam 3.9k points
0 votes
1 answer 33 views
Problem: I am very new to Spring Boot. At this time I am facing a problem with running my very simple Spring Boot Application. If I try to run my application then below error comes up:  java.net.BindException: Address already ... .embedded.tomcat.TomcatEmbeddedServletContainer.<init>(TomcatEmbeddedServletContainer.java:52)             at Can someone who knows spring boot help me with this error?
asked Aug 4, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 461 views
Problem : I am very new to Spring Boot. I am learning to write code in Spring Boot. I have written my first Spring Boot code as below @RequestMapping(value = "/bar/foo", method = RequestMethod.GET) public MyResponseEntity<foo> foo() { Foo model; ... return ... .core</groupId> <artifactId>jackson-databind</artifactId> <version>2.4.3</version> </dependency> How can I fix above Spring Boot exception?
asked Feb 29, 2020 mphil 2.3k points
0 votes
1 answer 161 views
Problem: I am very new with Hibernate Annotations and I have already encountered a problem I hope that someone here can help with. I have two entities mainly Section and ScopeTopic. The section entity has the List class member so the One to Many relationship. If I try to ... I think it must be my own lack of understanding which is at fault so some of the guidance from experts here would be great.
asked Aug 31, 2020 Raphael Pacheco 4.9k points
1 vote
1 answer 2.7K views
Problem : When I try to compile my spring project, I always face the below error : Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed I have the ... >1.4.1.RELEASE</version> <relativePath /> <!-- lookup parent from repository --> </parent> . . .
asked Dec 12, 2019 alecxe 7.5k points
0 votes
1 answer 23 views
I am facing problem creating a jbdc driver of class. I want to connect it to url null.
asked Sep 22, 2020 Daniel Anderson 4k points
0 votes
1 answer 33 views
Problem: I am facing the below strange looking exception while getting my datasource through jndi: Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null I am very new to java, spring and spring jdbc.
asked Sep 5, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 79 views
Problem : Facing following error related to class path error:could not determine the class-path for interface com.android.builder.model.androidproject.
asked Nov 12, 2019 peterlaw 6.9k points
0 votes
1 answer 140 views
Problem: I have recently started working on spring jdbc application. I am very new to spring and also developing spring jdbc application. Because of some reason my driver class is not getting loaded. I am facing below error: "org.springframework.beans. ... jdbcTemplate" ref="jdbcTemplate"></property> </bean> </beans> Can someone help me in fixing above spring related error?
asked Jul 14, 2020 Raphael Pacheco 4.9k points