aspose file tools*
The moose likes Websphere and the fly likes Hibernate class not found Exception!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Hibernate class not found Exception!!" Watch "Hibernate class not found Exception!!" New topic
Author

Hibernate class not found Exception!!

vin bhagvan
Greenhorn

Joined: May 09, 2004
Posts: 6
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

Joined: Apr 14, 2004
Posts: 10336

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?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
vin bhagvan
Greenhorn

Joined: May 09, 2004
Posts: 6
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

Joined: Apr 14, 2004
Posts: 10336


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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate class not found Exception!!