Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problems with CGLIB and hibernate

 
Mark Nuttall-Smith
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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 ]
 
Michael Swierczek
Ranch Hand
Posts: 125
1
Clojure Java Linux
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
test 2
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic