• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 371
  • Last Modified:

NoClassDefFoundError in IDE and Tomcat

Hi

I am getting a runtime exception as follows:


#############  Exception:
--------------------Configuration: peacBudget - JDK version 1.5.0_02 <Default> - <Default>--------------------
java.lang.NoClassDefFoundError: org/dom4j/DocumentException
        at peacBudget.HibernateUtil.<clinit>(HibernateUtil.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\peacBudget\WEB-INF\lib folder.

Am I regressing and losing basic java here?

Please help

Fernando


0
Fernando44
Asked:
Fernando44
  • 2
2 Solutions
 
fargoCommented:
dom4j.jar is missing in WEB-INF/lib folder
0
 
fargoCommented:
0
 
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
Best is to include all the jars provideed with hibernate to the WEB-INF/lib directory ( i.e which are present in the lib folder of the hibernate)  becuase it keeps on demanding one after the other if you want check it out.

Else atleast make sure you have included all the jars specified in the readme document of hibernate.

Thank You.
0
 
Fernando44Author Commented:
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:
http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_21826651.html

Many thanks

Fernando
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now