Shubham kumar
Shubham kumar

Reputation: 62

Hibernate dialect is no longer supported. My existing code is working fine but this warning make my console dirty

[2m2024-06-15T19:51:26.688+05:30[0;39m [33m WARN[0;39m [35m13968[0;39m [2m---[0;39m [2m[auth-spring-security] [  restartedMain][0;39m [2m[0;39m[36morg.hibernate.dialect.Dialect           [0;39m [2m:[0;39m HHH000511: The 5.5.5 version for [org.hibernate.dialect.MySQLDialect] is no longer supported, hence certain features may not work properly. The minimum supported version is 8.0.0. Check the community dialects project for available legacy versions.

Although the warning is not bad but i want to remove this for good coding practices

Upvotes: 2

Views: 2922

Answers (2)

Alex
Alex

Reputation: 16

Late answer, but maybe it will help someone. (I can’t be sure about the author’s case, based on this description of the problem reasons may be different). Some options:

  1. Make sure what you use exactly: MySQL or MariaDB. If you use MariaDB, you should use the MariaDB JDBC driver (instead mysql-connector-j that use for MySQL). You need to add the appropriate dependency and application.properties. [https://mariadb.com/kb/en/about-mariadb-connector-j/][1] Example:

application.properties:

spring.datasource.url=jdbc:mariadb://...
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver (#spring.jpa.properties.hibernate.dialect -- not need now at latest versions it leads to WARN: MySQLDialect does not need to be specified explicitly using 'hibernate.dialect'...)

pom:

    <dependency>
                <groupId>org.mariadb.jdbc</groupId>
                <artifactId>mariadb-java-client</artifactId>
                <version>3.4.0</version>
     </dependency>
  1. Check version of your database.May be should upgrade it. If upgrading not possible, you can use "hibernate-community-dialects"

Upvotes: 0

Kevin
Kevin

Reputation: 774

HHH000511: The 5.5.5 version for [org.hibernate.dialect.MySQLDialect] is no longer supported, hence certain features may not work properly. The minimum supported version is 8.0.0. Check the community dialects project for available legacy versions.

This log is a warning log indicating that the version 5.5.5 of Hibernate's MySQLDialect is no longer supported and the minimum supported version is 8.0.0.

Try using

spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect

Reference document

Upvotes: 0

Related Questions