aspose file tools*
The moose likes Object Relational Mapping and the fly likes java.lang.NoClassDefFoundError: org/hibernate/MappingException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "java.lang.NoClassDefFoundError: org/hibernate/MappingException " Watch "java.lang.NoClassDefFoundError: org/hibernate/MappingException " New topic
Author

java.lang.NoClassDefFoundError: org/hibernate/MappingException

Don Singh
Greenhorn

Joined: Jun 18, 2011
Posts: 18
Getting this exception, can someone help as to how to resolve it


HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet HibernateJavaWorld threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Unknown Source)


root cause

java.lang.NoClassDefFoundError: org/hibernate/MappingException
java.lang.Class.getDeclaredConstructors0(Native Method)
java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
java.lang.Class.getConstructor0(Unknown Source)
java.lang.Class.newInstance0(Unknown Source)
java.lang.Class.newInstance(Unknown Source)
org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:231)
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1142)
org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
javax.servlet.GenericServlet.init(GenericServlet.java:212)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Unknown Source)


root cause

java.lang.ClassNotFoundException: org.hibernate.MappingException
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
java.lang.Class.getDeclaredConstructors0(Native Method)
java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
java.lang.Class.getConstructor0(Unknown Source)
java.lang.Class.newInstance0(Unknown Source)
java.lang.Class.newInstance(Unknown Source)
org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:231)
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1142)
org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
javax.servlet.GenericServlet.init(GenericServlet.java:212)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Unknown Source)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.28 logs.


--------------------------------------------------------------------------------

Apache Tomcat/6.0.28
Waswani Naresh
Ranch Hand

Joined: May 01, 2008
Posts: 66
Looks like the main hibernate<version>.jar is not there in the class-path. Please copy it into the application's lib directory OR server's lib directory and then try.

Regards,
Naresh Waswani


Naresh Waswani
Don Singh
Greenhorn

Joined: Jun 18, 2011
Posts: 18
Its there Naresh,
see d list of files

antlr-2.7.6.jar
commons-collections-3.1.jar
dom4j-1.6.1.jar
hibernate3.jar
hsqldb.jar
javassist.jar
javax.servlet.jar
jta.jar
slf4j-api-1.5.8.jar
slf4j-simple-1.5.6.jar
struts-core-1.3.10.jar
Waswani Naresh
Ranch Hand

Joined: May 01, 2008
Posts: 66
What is the JDK compiler level set to ? Is it 4, 5, 6 ?

Regards,
Naresh Waswani
Don Singh
Greenhorn

Joined: Jun 18, 2011
Posts: 18
JDK 6
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java.lang.NoClassDefFoundError: org/hibernate/MappingException