struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <davelnew...@gmail.com>
Subject Re: SEVERE: Exception starting filter struts2
Date Tue, 26 Apr 2011 14:04:29 GMT
Just because ant or an ide sees a class doesn't mean the web server does
when you're deploying or starting up.

Almost certainly a classpath issue with the server, almost certainly not
Struts, just like the exception indicates.

Dave
 On Apr 26, 2011 8:52 AM, "alex zaim" <icidrop@yahoo.com> wrote:
> Hello. I'm trying to make a simple hibernate setup, but i encounter an
error when i start the server (Apache).
>
> 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.
> I assume it has to do with struts since the filter can not be initialized.
>
> 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.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message