• 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

ERRORgetProxyFactory, CGLIB Enhancement failed:

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Furthormore, in that class, I have one public non-parameter constructor. I use Hibernate 3. Thank you.
 
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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

Cheers,

Chris
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic