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

后端 未结 20 2490
南方客
南方客 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

    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 = ""
    )
    

提交回复
热议问题