• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unexpected error when running application from tomcat.

 
Owais Zahid
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have recently started using struts 2 . I am developed a web application. When i deploy the site on my tomcat 6 and start tomcat , i got the following error.

SEVERE: Servlet.service() for servlet default threw exception
java.lang.NoClassDefFoundError: Could not initialize class com.opensymphony.xwork2.util.profiling.UtilTimerStack
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:425)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:636)


please help , tell me what to do.

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post your configuration and what libraries you're deploying.
 
Owais Zahid
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David , this is my web.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

<!-- precompiled jsp mappings -->

<!-- Define the default CSS Theme -->
<context-param>
<param-name>csstheme</param-name>
<param-value>simplicity</param-value>
</context-param>
<!-- Define the basename for a resource bundle for I18N -->
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>ApplicationResources</param-value>
</context-param>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

</web-app>

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

And i am using the following libs

oscache-2.3.jar
hamcrest-library-1.1.jar
struts-menu-2.4.3.jar
xwork-2.0.4.jar
jstl-1.1.2.jar
jstl.jar
commons-dbcp-1.2.1.jar
commons-io-1.3.1.jar
dom4j-1.6.1.jar
sitemesh-2.2.1.jar
commons-pool-1.2.jar
xstream-1.3.1.jar
ognl-2.6.11.jar
commons-digester-1.7.jar
spring-test-2.5.4.jar
commons-httpclient-3.0.jar
commons-codec-1.3.jar
jdom-1.0.jar
commons-collections-3.2.jar
struts2-core-2.0.11.1.jar
hamcrest-core-1.1.jar
freemarker-2.3.8.jar
commons-lang-2.3.jar
commons-fileupload-1.2.1.jar
commons-logging-1.0.3.jar
itext-1.3.jar
jettison-1.1.jar
displaytag-1.1.1.jar
standard-1.1.2.jar
commons-beanutils-1.7.0.jar
standard.jar

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

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read.

You can edit your post by using the button.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You did not include your Struts 2 configuration file(s).
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wouldn't it make more sense to start with a plain S2 app, get that working, then continue, instead of trying to do everything at once?
 
Owais Zahid
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Sorry for the inconvenience. David, the application was working before, i don't know why its giving me this error now.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What did you change?

Try to isolate the problem by creating a small testcase and post the libs/configs for that.
 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you missing the xwork-core Jar, or is it called just xwork in that version of Struts 2?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic