Hibernate ASM Incompatibilities
01/29/2008
A few times now I’ve tried to use ASM 2.2.3 in an application that was utilizing Hibernate. It doesn’t work the way you’d hope. The easiest solution I’ve found is to remove the CGLib and ASM (1.5.3), which come with Hibernate and instead replace them with a copy of cglib-nodep. Using the no dependencies version of CGLib you can safely use the newer ASM without conflict.
I’ve heard this problem was occurring for Spring users before version 2.5. The two places I’ve encountered it were alongside Groovy and today with CXF. This solution worked in both instances and I am now using both Groovy and CXF alongside Hibernate without any Java exceptions being thrown.
[…] Also, if you are running Hibernate, you may encounter ASM incompatibilities between Hibernate’s CGLib and the version of ASM which CXF requires. But do not fret because this is easy enough to solve. […]
I have followed the same as you mentioned in the post but it didnt worked for me it says after loading cglib-Nodep
jar
caused by: java.lang.ClassNotFoundException: net.sf.cglib.asm.util.TraceClassVisitor not found in org.apache.catalina.loader.StandardClassLoader
Do you have any idea on this
THanks
Ram
Pretty! This was an extremely wonderful post. Thanks for supplying these details.
@Ben,@Ram
I have the same issue as you, Ram, have you guys found the solution?
Any advice is appreciated.