• Register
0 votes
104 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

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
1 answer 7 views
7 views
Problem: I am trying to run a spring boot application which is made by someone else. I have tried to attach my local database to the application but when I run this, it gives the following error; org.springframework.beans.factory.BeanCreationException: Error creating bean with ... { return new ModelMapper(); } } EDIT3 I run the Spring boot application with CMD using the command: java -jar xxx.jar
asked Apr 26 Yeamin 21.4k points
0 votes
1 answer 30 views
30 views
Problem : I am a completely novice in the hibernate world and facing this error: Generationtarget encountered exception accepting command : error executing ddl via jdbc statement .
asked Mar 13 Wafa Abu Yousef 6.1k points
0 votes
1 answer 2.4K views
2.4K 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
2 answers 675 views
675 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 4 views
4 views
Problem: Differentiate between. Difference between spring and spring boot.
asked Apr 19 PkGuy 23.5k points
0 votes
1 answer 4 views
4 views
Problem: Is there any way to read properties file in spring boot ?
asked Apr 10 zayed1 58.7k points
0 votes
1 answer 2 views
2 views
Problem: Please help me: how to deploy spring boot application in aws
asked Apr 8 tuhin1 48.9k points
0 votes
1 answer 5 views
5 views
Problem: Please help me to solve it. Spring-boot-starter-security
asked Apr 3 Ifra 34.7k points
0 votes
1 answer 4 views
4 views
Problem: If you could lead me in the right way, I would appreciate it.
asked Apr 1 zayed1 58.7k points
0 votes
1 answer 8 views
8 views
Problem: Does anyone know how how to read external properties file in spring boot??
asked Mar 30 zayed1 58.7k points