Announcement Announcement Module
Collapse
No announcement yet.
java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.Configur Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.Configur

    When I am running a JUnit test with AbstractTransactionalJUnit4SpringContextTests, I get the following class not found exception even though I already have the hibernate3.jar in the class path.

    Code:
    .......
    Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.Configuration
    	at java.lang.Class.forName0(Native Method)
    	at java.lang.Class.forName(Class.java:169)
    	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.class$(LocalSessionFactoryBean.java:160)
    	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.<init>(LocalSessionFactoryBean.java:160)
    	at org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean.<init>(AnnotationSessionFactoryBean.java:64)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:83)
    	... 81 more
    What is missing here?
Working...
X