• 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

Hibernate class not found Exception!!

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have used Hibernate 3.0 for Persistence and deployed our application on Websphere. When we start the application, we are getting following Class Not Found Exception.

------------------------------------------------------------
at om.ibm.ws.util.ThreadPool$Worker.runThreadPool.java:1455)
Caused by: java.lang.NoClassDefFoundError: net/sf/cglib/proxy/Enhancer
at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:116)
------------------------------------------------------------

org.hibernate.proxy.CGLIBLazyInitializer getProxyFactory CGLIB Enhancement failed:
java.lang.NoClassDefFoundError: net/sf/cglib/core/KeyFactory
at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
------------------------------------------------------------

I specified classpath in startup script, put hibernate*.jar and cglib*.jar in applicationserver/lib etc. Also, I verified that the required jars are inside Ear. But the Application continues to run after throwing these exceptions.

Any help appreciated.
 
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
Those classes are part of cglib. Are you sure you have deployed these to the right place? Particularaly given the ins and outs of WebSphere's class loading is a little complex?
 
vin bhagvan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks paul for the reply.

hibernate.jar and cglib*.jar are specified in the lib of the ear. Since, the required jars are within the ear, there shouldn't be any class loader related problems. Also, the required jars are specifies in the ApplicationServer/lib directory, startup script etc.

After doing some research, this looks like permission related issue. But the Applications continues to run fine after throwing these exceptions.
 
Paul Sturrock
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


hibernate.jar and cglib*.jar are specified in the lib of the ear. Since, the required jars are within the ear, there shouldn't be any class loader related problems. Also, the required jars are specifies in the ApplicationServer/lib directory, startup script etc


WebSphere has the concept of classloader isolation modes, so I wouldn't be so sure. I'm going to move this to the WebSphere forum, perhaps someone over there can help.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic