• Register
0 votes
32 views

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

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 241 views
241 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 alecxe 7.5k points
0 votes
1 answer 1.3K views
1.3K 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 jwilliam 3.9k points
0 votes
1 answer 19 views
19 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 Raphael Pacheco 4.9k points
0 votes
1 answer 242 views
242 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 mphil 2.3k points
0 votes
1 answer 10 views
10 views
I am facing problem creating a jbdc driver of class. I want to connect it to url null.
asked Sep 22 Daniel Anderson 4k points