org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
This Exception during the maven build in an hibernate based project could come due to various reasons.
Primarily one should look into the complete stack trace. The further exception usually do give clue of the actual problem.
I my case, the stack trace revealed the below issue
Primarily one should look into the complete stack trace. The further exception usually do give clue of the actual problem.
I my case, the stack trace revealed the below issue
Exception in thread "main" org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]To resolve this, since i am using maven to build, I introduced the dependency on the javassist jar in the pom.xml file.
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:110)
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:135)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.(EntityEntityModeToTuplizerMapping.java:80)
at org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:323)
at org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:456)
at org.hibernate.persister.entity.SingleTableEntityPersister.(SingleTableEntityPersister.java:131)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:267)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341)
at sample.PopulateMessages.main(PopulateMessages.java:13)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:107)
... 9 more
Caused by: java.lang.NoClassDefFoundError: javassist/util/proxy/MethodFilter
at org.hibernate.bytecode.javassist.BytecodeProviderImpl.getProxyFactoryFactory(BytecodeProviderImpl.java:49)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactoryInternal(PojoEntityTuplizer.java:208)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:186)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.(AbstractEntityTuplizer.java:151)
at org.hibernate.tuple.entity.PojoEntityTuplizer.(PojoEntityTuplizer.java:78)
This resolved the issue.
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.4.GA</version>
</dependency>
blablabla
ReplyDeleteI'm not using maven but tried adding javaassist.jar but still getting the same problem.Any other suggestion?
ReplyDeleteCan you provide more details? Let me know if the problem is still not resolved.
ReplyDeleteI had the same problem and javaassist.jar did not help.
ReplyDeleteIn my case, this happened when getter and setter spellings are not consistent or when such setter/getter did not exist at all.
For example:
If you had a member with the name ABC
and the getter was getMyABC()
Thanks for adding your views
ReplyDeleteadd the latest version of asm.jar
DeleteThanx,
Ashutosh
In my case it did help. Although I don't understand this and neither do I get why this is not mentioned in the books you read about Spring/hibernate... Very strange and not at all trustworthy...
ReplyDeleteadd the latest version of asm.jar
ReplyDeleteAshutosh
Hi Mr. Abhi.
ReplyDeleteI'm getting error
org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
But here it throws an exception
org.hibernate.MappingException: component class not found: com.pgapp.comm.InmateId
Where I changed my class name InmateId as InmateData,
then why it taking removed class
Can u pls help me how to resove it..
This Error caught in Myeclipse
Thanks
How to get to Mango Resort & Casino at Harrah's Philadelphia by Bus
ReplyDeleteDirections to Mango Resort & Casino 남원 출장샵 (Harrah's 사천 출장샵 Philadelphia) with 부산광역 출장안마 public transportation. The following 태백 출장샵 transit lines have routes 영천 출장마사지 that pass near