java.lang.NoClassDefFoundError: org/hibernate/Session hibernate jars is set -


i inherited several projects javas in new job, i'm having problems settings. i'm facing problem researched common. "java.lang.noclassdeffounderror: org / hibernate / session", put jars unnecessary hibernate mapped in classpath.

im using tomcat 7, hirbernat 4, jre7.

every project extends compnet have necessary jars in lib folder.

do need put mapped jars in project ?

the erro catch here:

    @override public void init(servletconfig config) throws servletexception {     super.init(config);     hibernateutil.currentsession(); } 

classpath:

<classpathentry kind="src" path="src"/> <classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> <classpathentry exported="true" kind="lib" path="/compnet/lib/xstream 1.3/xpp3_min-1.1.4c.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/xstream 1.3/xstream-1.3.1.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimetarget/apache tomcat v6.0"/> <classpathentry exported="true" kind="lib" path="/compnet/lib/commons fileupload 1.2.1/commons-fileupload-1.2.1.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/hibernate 3/antlr.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/hibernate 3/commons-collections.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/hibernate 3/dom4j.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/hibernate 3/ejb3-persistence.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/hibernate 3/hibernate-annotations.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/hibernate 3/hibernate-commons-annotations.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/hibernate 3/hibernate-validator.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/hibernate 3/hibernate3.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/hibernate 3/javassist.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/hibernate 3/jta.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/hibernate 3/jtds-1.2.4.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/hibernate 3/log4j.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/hibernate 3/slf4j-api.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/hibernate 3/slf4j-log4j12.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/commons logging/commons-logging-1.1.1.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/commons logging/commons-logging-adapters-1.1.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/commons logging/commons-logging-api-1.1.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry kind="con" path="org.eclipse.jdt.launching.jre_container"/> <classpathentry combineaccessrules="false" exported="true" kind="src" path="/pkg_ocorrencia"/> <classpathentry combineaccessrules="false" exported="true" kind="src" path="/pkg_mandado"/> <classpathentry exported="true" kind="lib" path="/compnet/lib/jasper - ireport 3.7.4/commons-beanutils-1.8.2.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/jasper - ireport 3.7.4/commons-digester-1.7.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/jasper - ireport 3.7.4/groovy-all-1.5.5.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/jasper - ireport 3.7.4/itext-2.1.0.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/jasper - ireport 3.7.4/jasperreports-3.7.4.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/jasper - ireport 3.7.4/jasperreports-chart-themes-3.7.4.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/jasper - ireport 3.7.4/jasperreports-extensions-3.5.3.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/jasper - ireport 3.7.4/jasperreports-fonts-3.7.4.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/jasper - ireport 3.7.4/spring.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/jasper - ireport 3.7.4/xalan.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/jasper - ireport 3.7.4/jfreechart-1.0.12.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry exported="true" kind="lib" path="/compnet/lib/jasper - ireport 3.7.4/jcommon-1.0.15.jar">     <attributes>         <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>     </attributes> </classpathentry> <classpathentry combineaccessrules="false" kind="src" path="/compnet"/> <classpathentry exported="true" kind="lib" path="/compnet/lib/commons email 1.2/commons-email-1.2.jar"/> <classpathentry kind="lib" path="d:/tomcat 7/apache-tomcat-7.0.27/lib/servlet-api.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/antlr-2.7.7.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/c3p0-0.9.1.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/dom4j-1.6.1.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/ehcache-core-2.4.3.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/hibernate-c3p0-4.1.4.final.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/hibernate-commons-annotations-4.0.1.final.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/hibernate-core-4.1.4.final.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/hibernate-ehcache-4.1.4.final.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/hibernate-entitymanager-4.1.4.final.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/hibernate-envers-4.1.4.final.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/hibernate-infinispan-4.1.4.final.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/hibernate-jpa-2.0-api-1.0.1.final.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/hibernate-proxool-4.1.4.final.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/infinispan-core-5.1.4.final.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/javassist-3.15.0-ga.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/jboss-logging-3.1.0.ga.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/jboss-marshalling-1.3.11.ga.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/jboss-marshalling-river-1.3.11.ga.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/jboss-transaction-api_1.1_spec-1.0.0.final.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/jgroups-3.0.9.final.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/proxool-0.8.3.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/rhq-pluginannotations-3.0.4.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/slf4j-api-1.6.1.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/stax2-api-3.1.1.jar"/> <classpathentry kind="lib" path="/compnet/lib/hibernate4/woodstox-core-asl-4.1.1.jar"/>  <classpathentry kind="output" path="build/classes"/> 

stacktrance:

java.lang.noclassdeffounderror: org/hibernate/session @ br.com.flex4j.servlet.genericactionservlet.init(genericactionservlet.java:29) @ org.apache.catalina.core.standardwrapper.loadservlet(standardwrapper.java:1161) @ org.apache.catalina.core.standardwrapper.allocate(standardwrapper.java:806) @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:129) @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:175) @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:128) @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:102) @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:109) @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:263) @ org.apache.coyote.http11.http11processor.process(http11processor.java:844) @ org.apache.coyote.http11.http11protocol$http11connectionhandler.process(http11protocol.java:584) @ org.apache.tomcat.util.net.jioendpoint$worker.run(jioendpoint.java:447) @ java.lang.thread.run(unknown source) caused by: java.lang.classnotfoundexception: org.hibernate.session @ org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1358) @ org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1204) ... 13 more

jun 21, 2012 3:39:22 pm org.apache.catalina.core.standardwrappervalve invoke severe: allocate exception servlet genericactionservlet java.lang.classnotfoundexception: org.hibernate.session @ org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1358) @ org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1204) @ br.com.flex4j.servlet.genericactionservlet.init(genericactionservlet.java:29) @ org.apache.catalina.core.standardwrapper.loadservlet(standardwrapper.java:1161) @ org.apache.catalina.core.standardwrapper.allocate(standardwrapper.java:806) @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:129) @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:175) @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:128) @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:102) @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:109) @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:263) @ org.apache.coyote.http11.http11processor.process(http11processor.java:844) @ org.apache.coyote.http11.http11protocol$http11connectionhandler.process(http11protocol.java:584) @ org.apache.tomcat.util.net.jioendpoint$worker.run(jioendpoint.java:447) @ java.lang.thread.run(unknown source)

edit:

classpath of project: properties>java build path

from understand classpath xml provided used eclipse, has nothing web application classpath. reason noclassdeffounderror tomcat not being able find hibernate class. make sure web module has required jars in web-inf/lib directory.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -