-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: NoClassDefFoundError: org/hibernate/cfg/Configuration
PostPosted: Sat May 19, 2012 1:20 pm 
Newbie

Joined: Sat May 19, 2012 11:21 am
Posts: 1
Hi,

I am currently stuck at my project with a strange java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration exception.
I get this exception at the line: SessionFactory sessionFactory = new Configuration().configure("xml\\hibernate.cfg.xml").buildSessionFactory();

And yes, i have the hibernate jars in lib folder and have included them in java build path.
The code and configuration doesnt seem to have a problem as they work fine in an independent java project whereas throws this exception when executed from an EJB project jar.

Is it a class loading conflict between EJB project jars and JBOSS AS7 persistance jars which are in modules folder of Jboss?

Any help would be much appreciated!!!

More details below:

I am using Eclipse, JBoss AS7.0.2 Final & hibernate 3
My project structure is as below:
<project name>
-------.settings
-------build
-------ejbModule
-----------au (code)
-----------lib
-----------META-INF
-----------resources (some xsd files)
-----------xml (hibernate config files)

All jars in lib folder are getting included in the EJB jar when deploying and are getting extracted in the Jboss/standalone/deployments folder.

I have the following jars in the project lib folder
ant-antlr-1.6.3.jar
antlr-2.7.5H3.jar
asm-attrs.jar
cglib-2.1.jar
commons-collections-2.1.1.jar
commons-logging-1.0.4.jar
dom4j-1.6.jar
ehcache-1.1.jar
ejb-3.0.jar
hibernate-annotations-3.3.0.ga.jar
hibernate-commons-annotations-3.1.0.GA.jar
hibernate3.jar
hornetq-core-2.2.7.Final.jar
hornetq-jms-2.2.7.Final.jar
hsqldb.jar
javaee.jar
jbossall-client.jar
jms.jar
jnp-client.jar
jta.jar
log4j-1.2.9.jar
mysql-connector-java-5.0.4-bin.jar
ojdbc14.jar
wloracle.jar
wlsqlserver.jar


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.