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

ERRORgetProxyFactory, CGLIB Enhancement failed:

 
Kazza Summers
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

If anyone could help me with this, it would be great. This is the output Im getting when I try and run my project. Im getting the same thing for all classes I have mapping files for?

Thanks Karry
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you post the stacktrace and maybe explain a little about what you are doing? People can only guess with the information you have provided so far.
 
Mingwei Jiang
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I met the same problem. The stack trace is as below:

 
Mingwei Jiang
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Furthormore, in that class, I have one public non-parameter constructor. I use Hibernate 3. Thank you.
 
Travis Hein
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recently found I was having this problem too, when I was not before.

It turns out that it was something to do with having more than one version of the cglib jar file in the web app's class path. Though I am not sure if it is this jar file, or any of the other jar files that hibernate uses and depends on, as I also had the rest of the hibernate jar files in the class path in a different version.

By removing conflicting versions of the cglib & other jars, things worked again.

My environment was using tomcat, i had set up my instance to place a bunch of commonly used, third party jar files into ${CATALINA_BASE}/shared/lib folder, since the webapps i was running in this tomcat instance all were using the same version of hibernate, struts, etc.

(Note that the shared/lib folder is the one on your CATALINA_BASE, or instance, not the CATALINA_HOME, the installation folder for tomcat, though most default installed instances, these are the same, just one of those things that drove me nuts at first...)

With these jar files located here, they are loaded according to the servlet spec / tomcat's class loader tree as:
${CATALINA_HOME}/common/lib
${CATALINE_BASE}/shared/lib
<the webapp>/WEB-INF/lib

This particular war file i was building was packaging (an older version) of hibernate.jar and its supporting third party jar files into the war file.
so something was amiss there; removing them from the jar file (as the newer ones i had in the shared/lib folder would provide for my webapp)

I guess one could also have removed them from the shared/lib and made each web app have their own copy of the jar files.

I have found though with tomcat 5, now that it uses commons logging, it likes to have log4j in the common/lib folder.
 
Sven Walsted
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you'll find the problem is just what the stack trace is indicating:

Caused by: java.lang.NoSuchMethodError: net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V

You need the cglib-2.1.3.jar (with the version of hibernate I'm using) in your classpath. I've seen other "missing" classes generate a similar exception.
 
Chris Treber
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

in my case it was Xerces and/or Castor interfering - got rid of them both.

Cheers,

Chris
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic