I am developing an application with Hibernate and I get an Exception when I connect with database. The exception is:
Unable to instantiate default tuplizer [
I was also facing the same issue.
Added the same dependency and it worked (like this):
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
According to the stack trace:
Caused by: java.lang.NoClassDefFoundError: javassist/util/proxy/ProxyObject at java.lang.ClassLoader.defineClass1(Native Method)
The issue is caused by "java.lang.NoClassDefFoundError", so I think you should focus on this.
The direct solution is to add dependency
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
to your pom.xml.
I know this post is old, but i ran in the same problem, and i solved it by simply changing my configuration from Java 11 down to Java 8.
In my case I had a Kotlin class with some fields which were not open so the generated Java
setters and getters would be final. Solved it by adding open
keyword to each field.
Before:
open class User(
var id: String = "",
var email: String = ""
)
After:
open class User(
open var id: String = "",
open var email: String = ""
)
When I ran into this error the fix was simple. I was simply missing a setter for a property. Make sure you define matching getters / setters for all your properties.
I had the same problem and resolved it adding this dependency.
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
I am using hibernate 3.6 version.