-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello @ all!
I really need your help!
I want to combine Hibernate and ZK in my project. First I tried hibernate in a normal java project, and that works perfectly!
Then I tried to do the same with ZK. I got a lot of errors, but I solved them by including several .jars. In the end I get this error I couldn't cope:
SCHWERWIEGEND: >>org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
>>java.lang.reflect.InvocationTargetException: null
>>java.lang.NoClassDefFoundError: javassist/util/proxy/MethodFilter
>>java.lang.ClassNotFoundException: javassist.util.proxy.MethodFilter
>> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
>> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1493)
>> at org.hibernate.bytecode.javassist.BytecodeProviderImpl.getProxyFactoryFactory(BytecodeProviderImpl.java:49)
>> at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactoryInternal(PojoEntityTuplizer.java:205)
>> at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:183)
>> at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:167)
>>...
I included javassist and still get this error. I copied the javassist.jar to the lib-directory of my project and I added the .jar to my Classpath (rightclick on the project -> java build path -> Add external jars ...)
What am I doing wrong???? please help me!
greetings!
First, try to do an EXPORT as war file and look if there are TWO javassist.jar's in the lib folder.
Which version of hibernate you use?
best
Stephan
Ok, I exported the project as .war ... how could I look now if there are two javassists???
I use now javassist 3.4 (because 3.14 didn't work, I tried 3.4) and hibernate version 3.6
thx so far...
open the war-file with the winRar compression tool and look for the WEB-INF/lib folder
Alright, sorry... I opended it, and there is only one javassist.
Try to use the 'cglib' instead of 'javassist'
https://forum.hibernate.org/viewtopic.php?t=990648&highlight=&sid=a7711178e036eb618cd1485dc7fd5793
http://entwickler.de/zonen/portale/psecom,id,99,news,34959,.html
http://forum.springsource.org/showthread.php?t=86330
Great!!! It works now!
I only had to create a hibernate.properties file and add this line:
hibernate.bytecode.provider = cglib
in addition I needed to inlcude the jta.jar to my lib path:
http://www.java2s.com/Code/Jar/JKL/Downloadjtajar.htm
Thanks again!
All the best!
Asked: 2011-02-28 05:34:24 +0800
Seen: 697 times
Last updated: Feb 28 '11