Hello. I'm trying to make a simple hibernate+struts2 setup, but i encounter an 
error when i start the server (Tomcat 7.0.8).

Apr 26, 2011 3:20:18 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
java.lang.NoClassDefFoundError: org/hibernate/Session
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
    at java.lang.Class.getConstructor0(Class.java:2699)
    at java.lang.Class.getConstructor(Class.java:1657)
    at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:414)
    at
 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:365)
    at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:479)
    at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:275)
    at 
org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
    at 
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:204)
    at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
    at 
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371)
    at
 org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415)
    at 
org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
    at 
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
    at 
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:273)
    at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254)
    at
 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:372)
    at 
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:98)
    at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4461)
    at
 org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5133)
    at 
org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5128)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: org.hibernate.Session
    at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
    at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
    ... 27 more
Apr 26, 2011
 3:20:18 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error filterStart
Apr 26, 2011 3:20:18 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Translators] startup failed due to previous errors


Now
 i know that this looks way to easy to spot. It's obvious that i am 
missing a class. But the problem is that the class is right there where 
it should be. I mean, Ant sees the class and gives no compilation errors, also 
my IDE (Eclipse) sees the class (from the build path), but when i start the 
server, it gives my that error.

The guys from struts mailing list say that the error is server specific, so i 
decided to report it here.

Another
 interesting thing is that if i remove the jar (which contains the 
specific class) from the project's build path, the server will launch 
with no erros, but will fail when an action is triggered that uses that 
class. 

Reply via email to