Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]

后端 未结 20 2348
南方客
南方客 2020-12-08 02:10

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 [         


        
相关标签:
20条回答
  • 2020-12-08 02:26

    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> 
    
    0 讨论(0)
  • 2020-12-08 02:26

    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.

    0 讨论(0)
  • 2020-12-08 02:26

    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.

    0 讨论(0)
  • 2020-12-08 02:26

    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 = ""
    )
    
    0 讨论(0)
  • 2020-12-08 02:29

    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.

    0 讨论(0)
  • 2020-12-08 02:30

    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.

    0 讨论(0)
提交回复
热议问题