RSS Entries RSS
RSS Subscribe by Email

Hibernate ASM Incompatibilities

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.

Share and Enjoy:
  • Add to favorites
  • HackerNews
  • DZone
  • Reddit
  • del.icio.us
  • StumbleUpon
  • Slashdot
  • Digg
  • Google Bookmarks
  • Facebook

Tags: , , , ,

2 Comments »

  1. Web Services Tutorial with Apache CXF | Lumidant said,

    February 3, 2008 at 12:24 pm

    [...] 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. [...]

  2. Ram said,

    October 5, 2009 at 6:51 am

    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

RSS feed for comments on this post · TrackBack URL

Leave a Comment