Error added: 2009-09-30T07:43:30Z
the problem was solved for me when I went from cglib-2.2.jar to cglib-2.1.jar
The âUnable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizerâ is a generic error message, it may caused by many reasons. So, you have to look at the last line that caused the error. Advice from <a href="http://www.google.co.uk/url?sa=t&source=web&cd=6&sqi=2&ved=0CFAQFjAF&url=http%3A%2F%2Fwww.mkyong.com%2Fhibernate%2Fjava-lang-nosuchmethoderror-org-objectweb-asm-classwriter%2F&rct=j&q=Unable%20to%20instantiate%20default%20tuplizer%20%5Borg.hibernate.tuple.entity.PojoEntityTuplizer%5D&ei=dgXkTJ9TjoOFB-zG0ZIN&usg=AFQjCNFeQTA_xu6c9_PBiu3HSWspmd1_Og&sig2=-E6muGqwuNzlt5QNzzZFdw&cad=rja">here</a>
<dependency> <groupId>javassist</groupId> <artifactId>javassist</artifactId> <version>3.12.0.GA</version> <type>jar</type> <scope>compile</scope> </dependency>
<dependency> <groupId>jboss</groupId> <artifactId>javassist</artifactId> <version>3.8.0.GA</version> <type>jar</type> <scope>compile</scope> </dependency>
Answer 1365 helped me find the error. In my case my id field was an "int" but the class.hbm.xml listed it as java.lang.Integer. I changed the type to "Integer" and it worked.
Ensure that the getter and setter functions are in the format: getVariablename, and setVariablename. The variable names will have to be the same as the ones listed inside the bean. E.g. if the variable is username, the getter and setter will be getUsername and setUsername.
If you add a getter method not on a variable you need to annotate it with @Transient (hibernate will leave that getter out)
problem is resolved when I added javaassist3.8.0.GA jar
thank you so much guys ! the problem was solved for me when I went from cglib-2.2.jar to cglib-2.1.jar saved me. i used full-hibernate plugin in it.
In my case there were errors in my mapping files. Classes were not referenced by their full package names. I did this mistake because I generated the mappings when my bean classes belonged to the default package (hence no package name; e.g.: "Order" instead of "com.mypackage.Order") and then I moved my bean classes to package (in the example "com.mypackage"). Unfortunately mapping files did not changed accordingly with the new package definition. My hint is redo Hibernate reverse engineering and see what it produces.
Add javassist.jar
In my case, this was caused by running out of permgen space. I was running my junit test from eclipse, and the permgen error was scrolled up farther than the console buffer, so I couldn't see it. I added this to my run configuration vm arguments to fix it: -XX:MaxPermSize=256m
Answer 7 Sometimes if you use composite PRIMARY key. Hıbernate tool generate for example abc.java and abcId.java . The abcId.java is geeratd for composıte Pk and this cause such error. Answer 8 I your table does not have an Pk. like abc.java and abcId.java classes are generated via Hibernate tool. And this cause such error. Answer 9 For example in your xml file there exist an entry like <property name=\"definitionId\" type=\"string\"> <column name=\"definition_id\" /> </property> But your column type is actually integer in your DB. Such mistakes may cause such errors.
Fantastic work is done here..i really appreciate it from my bottom of heart.. cglib2.1 is replaced with 2.2...and worked....
U\'ll get this error if you dont have the getter and the setter of a variable.
Maybe the cause are jar files you have added to classpath.
A derivative of #1 worth mentioning. I happened to name a boolean field \"isPrimaryOwner\" and the \"get\" method name was \"isPrimaryOwner()\". This caused the problem and was difficult to notice. I should have named the field \"primaryOwner\".
I'm Working with flex 4 using BlaseDS for services so when generating service call from "Data/Services" identical classes of my java classes will be created with actionScript code in objectValues folder, changing/removing/adding new attributes on your java classes would cause this error... Just delete the service and generate it again that would fix the issue. Hope that helps someone
If you know the answer, please add your own solution below.
If you don't know, but find out later, please come back and share your answer - there will be other people
struggling with this too.
If you want to be notified via email when this is solved, enter your email address here: