This week's book giveaway is in the Cloud forum.
We're giving away four copies of Terraform in Action and have Scott Winkler on-line!
See this thread for details.
Win a copy of Terraform in Action this week in the Cloud forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

NoClassDefFoundError net/sf/cglib/KeyFactory

 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can any body pls give me advise how to resolve for the following error


D:\hibernate>java com.reddy.EventManager
Nov 2, 2005 11:39:16 AM net.sf.hibernate.cfg.Environment <clinit>
INFO: Hibernate 2.0.3
Nov 2, 2005 11:39:16 AM net.sf.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Nov 2, 2005 11:39:16 AM net.sf.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
Nov 2, 2005 11:39:16 AM net.sf.hibernate.cfg.Environment <clinit>
INFO: JVM proxy support: true
Nov 2, 2005 11:39:16 AM net.sf.hibernate.cfg.Configuration getConfigurationInput
Stream
INFO: Configuration resource: /hibernate.cfg.xml
Nov 2, 2005 11:39:16 AM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: Review.hbm.xml
Nov 2, 2005 11:39:16 AM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.reddy.Event -> EVENTS
Nov 2, 2005 11:39:16 AM net.sf.hibernate.cfg.Configuration configure
INFO: Configured SessionFactory: null
Nov 2, 2005 11:39:16 AM net.sf.hibernate.cfg.Configuration secondPassCompile
INFO: processing one-to-many association mappings
Nov 2, 2005 11:39:16 AM net.sf.hibernate.cfg.Configuration secondPassCompile
INFO: processing foreign key constraints
java.lang.NoClassDefFoundError: net/sf/cglib/KeyFactory
at net.sf.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.
java:297)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.
java:627)
at com.reddy.Util.<clinit>(Util.java:22)
at com.reddy.EventManager.create(EventManager.java:37)
at com.reddy.EventManager.main(EventManager.java:27)
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.reddy.Util.<clinit>(Util.java:25)
at com.reddy.EventManager.create(EventManager.java:37)
at com.reddy.EventManager.main(EventManager.java:27)
Caused by: java.lang.NoClassDefFoundError: net/sf/cglib/KeyFactory
at net.sf.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.
java:297)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.
java:627)
at com.reddy.Util.<clinit>(Util.java:22)
... 2 more
[ November 02, 2005: Message edited by: Mark Spritzler ]
 
ranger
Posts: 17346
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
Help, isn't really a good topic title, it tells us nothing about what your problem is.

It looks like you have a classpath issue, or a different version of the file based on what the classloader currently has.

Which jar is this file located?

Mark
 
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Verify that the cglib jar that came with Hibernate is in your classpath.

Also make sure you don't have any other versions of cglib in the classpath that may conflict.
 
Graham Thorpe
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your response .Yes i didn`t set classpath cglib.jar .

Now its working after set the classpath .
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic