close

[solved] HHH000342: Could not obtain connection to query metadata : null

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error HHH000342: Could not obtain connection to query metadata : null in java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How HHH000342: Could not obtain connection to query metadata : null Error Occurs?

Today I get the following error HHH000342: Could not obtain connection to query metadata : null in java.

How To Solve HHH000342: Could not obtain connection to query metadata : null Error ?

  1. How To Solve HHH000342: Could not obtain connection to query metadata : null Error ?

    To Solve HHH000342: Could not obtain connection to query metadata : null Error I would also suggest you use MySQLInnoDBDialect or MySQLMyISAMDialect directly.

  2. HHH000342: Could not obtain connection to query metadata : null

    To Solve HHH000342: Could not obtain connection to query metadata : null Error I would also suggest you use MySQLInnoDBDialect or MySQLMyISAMDialect directly.

Solution 1

Rename hibernate.connection.dialect to hibernate.dialect in your persistence.xml

I would also suggest you use MySQLInnoDBDialect or MySQLMyISAMDialect directly.

And it needs to be the full class name like this:

<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment