• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate class not found Exception!!

 
vin bhagvan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • 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
  • 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
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic