Reputation: 1370
I'm trying to connect to my database when I start my server in drop wizard. But I get the following error when I try to start the server
org.hibernate.engine.jdbc.internal.JdbcServicesImpl: HHH000342:
Could not obtain connection to query metadata :
Driver:org.h2.Driver@7ed6a46e returned null for
URL:jdbc:mysql://localhost:3306/testDatabase
Here is the code for my .yml (yaml) file
# Database settings.
database:
# the name of your JDBC driver
driverClass: org.h2.Driver
# the username
user: root
# the password
password: superSecretPassword
# the JDBC URL
url: jdbc:mysql://localhost:3306/testDatabase
server:
type: simple
connector:
type: http
port: 8080
What could be the problem here?
Upvotes: 1
Views: 774
Reputation: 69470
You use a wrong JDBC- Driver class: org.h2.Driver
You have to use a mysql driver like com.mysql.jdbc.Driver
Upvotes: 2