Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1313 upgrade deprecated MySQL driver #1313

Closed
sant0s opened this issue Jul 25, 2019 · 1 comment · Fixed by #1314
Closed

#1313 upgrade deprecated MySQL driver #1313

sant0s opened this issue Jul 25, 2019 · 1 comment · Fixed by #1314
Labels
Milestone

Comments

@sant0s
Copy link
Contributor

sant0s commented Jul 25, 2019

Actual Behavior

Setting

db.driver=com.mysql.cj.jdbc.Driver

in application.conf

results in

Unexpected error : Unexpected Error, caused by exception UnsupportedOperationException: I do not know which hibernate dialect to use with com.mysql.cj.jdbc.Driver and I cannot guess it, use the property jpa.dialect in config file

and setting

jpa.dialect=org.hibernate.dialect.MySQL8Dialect

results in

Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

Play Version

1.5.3

Operating System

Ubuntu 18.04

JDK

Oracle 1.8.0_201-b09

Library Dependencies

MySQL driver JAR bundled with Play: mysql-connector-java 5.1.46

Expected Behavior

Play should load the Connector/J 8.0 MySQL driver when it finds

db.driver=com.mysql.cj.jdbc.Driver

in application.conf and recognise the correponding JPA dialect, regardless of whether it's declared in application.conf via

jpa.dialect=org.hibernate.dialect.MySQL8Dialect

No warning message should be issued.

Connector/J 8.0 (mysql-connector-java 8.0.17) provides compatibility with all the functionality of MySQL 5.6, 5.7, and 8.0.

https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-versions.html

@sant0s sant0s changed the title Upgrade deprecated MySQL driver #1313 upgrade deprecated MySQL driver Jul 25, 2019
sant0s added a commit to sant0s/play that referenced this issue Jul 25, 2019
xael-fry added a commit that referenced this issue Jul 31, 2019
#1313 upgrade deprecated MySQL driver
@xael-fry xael-fry added this to the 1.5.4 milestone Jul 31, 2019
@xael-fry
Copy link
Member

Merged with #1314
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants