• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problems with CGLIB and hibernate

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am trying to work my way through the hibernate tutorial here:
http://www.gloegl.de/5.html
but I am encountering problems with: "ERROR - CGLIB Enhancement failed: com.hsbc.persistence.Event
java.lang.NoClassDefFoundError: org/objectweb/asm/Type"

I've googled around and have seen two theories:
1. Conflicts of multiple copies of Cglib on the classpath
2. If you use lazy loading with proxies (default for all classes in Hibernate 3), Hibernate needs to subclass your class at runtime. It can't do this if you have a private no-argument constructor. As per documentation, at least package visibility is required. (from the faq)

....but neither of these seem to apply and I'm running out of ideas.
Could somebody take a look and help out please? Thanks very much,
Mark

Console output.....



[ September 01, 2006: Message edited by: Jim Yingst ]
 
Ranch Hand
Posts: 125
1
Clojure Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't have the hibernate download in front of me. I believe version 3 requires a library or set of libraries called asm.jar or asm-attrib.jar or something similar, and the README file included in the release fails to mention that.

So if you haven't done so already, look for files with that name, add it to your project, and try again. Good luck.
 
Michael Swierczek
Ranch Hand
Posts: 125
1
Clojure Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Somehow, my last response is appearing blank. Let me try again.

Do you have asm.jar and asm-attrs.jar in your class path? They're required for hibernate to work, and I'm pretty sure that's what CGLIB is choking on.
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
test 2
reply
    Bookmark Topic Watch Topic
  • New Topic