Fernando44
asked on
NoClassDefFoundError in IDE and Tomcat
Hi
I am getting a runtime exception as follows:
############# Exception:
--------------------Config uration: peacBudget - JDK version 1.5.0_02 <Default> - <Default>----------------- ---
java.lang.NoClassDefFoundE rror: org/dom4j/DocumentExceptio n
at peacBudget.HibernateUtil.< clinit>(Hi bernateUti l.java:59)
Exception in thread "main"
Process completed.
################### Extract of class that has the exception:
package peacBudget;
import org.hibernate.*;
import org.hibernate.cfg.*;
import org.hibernate.hql.*;
public class HibernateUtil {
private HibernateUtil() {
}
private static final SessionFactory sessionFactory;
private static Configuration config = new Configuration().configure( );
###Exception is thrown at this line.
#################
The class compiles OK but cannot find Configuration class which is in the
hibernate3.jar which is in my class path (or else would not compile)
I am getting the same exception from Tomcat which has the hibernate3.jar in the
C:\Tomcat4\webapps\peacBud get\WEB-IN F\lib folder.
Am I regressing and losing basic java here?
Please help
Fernando
I am getting a runtime exception as follows:
############# Exception:
--------------------Config
java.lang.NoClassDefFoundE
at peacBudget.HibernateUtil.<
Exception in thread "main"
Process completed.
################### Extract of class that has the exception:
package peacBudget;
import org.hibernate.*;
import org.hibernate.cfg.*;
import org.hibernate.hql.*;
public class HibernateUtil {
private HibernateUtil() {
}
private static final SessionFactory sessionFactory;
private static Configuration config = new Configuration().configure(
###Exception is thrown at this line.
#################
The class compiles OK but cannot find Configuration class which is in the
hibernate3.jar which is in my class path (or else would not compile)
I am getting the same exception from Tomcat which has the hibernate3.jar in the
C:\Tomcat4\webapps\peacBud
Am I regressing and losing basic java here?
Please help
Fernando
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Fargo
It was looking me in the face!
Thanks!
Could you go to the next query as I am getting the NoClassDefFoundError in Tomcat even though the jar files are in the lib folders:
https://www.experts-exchange.com/questions/21826651/NoClassDefFoundError-in-Tomcat.html
Many thanks
Fernando
It was looking me in the face!
Thanks!
Could you go to the next query as I am getting the NoClassDefFoundError in Tomcat even though the jar files are in the lib folders:
https://www.experts-exchange.com/questions/21826651/NoClassDefFoundError-in-Tomcat.html
Many thanks
Fernando
Else atleast make sure you have included all the jars specified in the readme document of hibernate.
Thank You.