• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

NoClassDefFoundError:

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I am getting this exception when i try to get the sessionFactory from the Configuration object.

"java.lang.NoClassDefFoundError: net/sf/hibernate/cfg/Configuration."

I am using Tomcat 5.0.28 and have placed the hibernate.cfg.xml and the mapping xml under web-inf/classes and the actual class files under web-inf/classes/com/abc/ ..

My classpath includes the hibernate jar files hibernate2.jar and cglib-full-2.0.2.jar along with the other required jar's like servlet-api.jar....

Would be great if someone can help me get thru this.

Thanks
Karthik
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the hibernate.jar file in Tomcat's classpath? or is it possible that that jar file is being lodaed by a different classloader within Tomcat?

Mark
[ December 02, 2005: Message edited by: Mark Spritzler ]
 
Karthik Vijayarajan
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah. You were right Mark.
I just copied the hibernate2.jar into web-inf/lib of my tomcat and included in the classpath and it works fine.
Trying to get thru few more exceptions :-)

Thanks a lot.
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cool. I am glad that worked. I like it when I get one right every once in a while.

Mark
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic