EN
Spring Boot - Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured (mchange-commons-java-0.2.19.jar).
1 answers
7 points
I am working with my Spring Boot Application.
I have got some error:
xxxxxxxxxx
1
java.nio.file.NoSuchFileException: C:\Users\thomas\.m2\repository\com\mchange\c3p0\0.9.5.5\mchange-commons-java-0.2.19.jar
xxxxxxxxxx
1
***************************
2
APPLICATION FAILED TO START
3
***************************
4
5
Description:
6
7
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
8
9
Reason: Failed to determine a suitable driver class
10
11
12
Action:
13
14
Consider the following:
15
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
16
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
17
18
Disconnected from the target VM, address: '127.0.0.1:63565', transport: 'socket'
1 answer
3 points
As I see the JAR file name was changed from mchange-commons-java-0.2.19.jar
to c3p0-0.9.5.5.jar
.
Expected file path:
xxxxxxxxxx
1
C:\Users\thomas\.m2\repository\com\mchange\c3p0\0.9.5.5\mchange-commons-java-0.2.19.jar
Found file path:
xxxxxxxxxx
1
C:\Users\thomas\.m2\repository\com\mchange\c3p0\0.9.5.5\c3p0-0.9.5.5.jar
Hints:
- it looks like bug caused by changes against detected vulnerabilities in Mchange Commons Java » 0.2.19 (check this link)
- if you use hibernate-c3p0, check latest versions and site notification:
Note: This artifact was moved to: org.hibernate.orm » hibernate-c3p0 » 6.0.0.CR2
Screenshot with changed name:
Solution
You can try to:
- Upgrade
hibernate-c3p0
https://mvnrepository.com/artifact/org.hibernate/hibernate-c3p0 - or: do not use:
xxxxxxxxxx
1<dependency>
2<groupId>org.hibernate</groupId>
3<artifactId>hibernate-c3p0</artifactId>
4<version><!-- used version here ... --></version>
5<scope>compile</scope>
6</dependency>
0 commentsShow commentsAdd comment