严重: Exception starting filter struts2

杨松坤 发布于 2012/12/16 09:31
阅读 9K+
收藏 0

【DevOps必读】产品经理与程序员之间如何破局?>>>

2011-12-16 0:47:55 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.1.22.
2011-12-16 0:47:55 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
2011-12-16 0:47:56 org.apache.coyote.http11.Http11AprProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2011-12-16 0:47:56 org.apache.coyote.ajp.AjpAprProtocol init
信息: Initializing Coyote AJP/1.3 on ajp-8009
2011-12-16 0:47:56 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1397 ms
2011-12-16 0:47:56 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2011-12-16 0:47:56 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.35
2011-12-16 0:47:56 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor host-manager.xml
2011-12-16 0:47:57 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor manager.xml
2011-12-16 0:47:57 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory Bank_Report
log4j:WARN No appenders could be found for logger (com.opensymphony.xwork2.config.providers.XmlConfigurationProvider).
log4j:WARN Please initialize the log4j system properly.
2011-12-16 0:48:00 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Class: com.opensymphony.xwork2.spring.SpringObjectFactory
File: SpringObjectFactory.java
Method: getClassInstance
Line: 209 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:209:-1
 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:431)
 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.getFilter(ApplicationFilterConfig.java:295)
 at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
 at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
 at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
 at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
 at org.apache.catalina.core.StandardService.start(StandardService.java:525)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.NullPointerException
 at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:209)
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyResultType(XmlConfigurationProvider.java:519)
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addResultTypes(XmlConfigurationProvider.java:490)
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:446)
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:264)
 at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
 at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:193)
 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
 at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)
 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418)
 ... 29 more
2011-12-16 0:48:00 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2011-12-16 0:48:00 org.apache.catalina.core.StandardContext start
严重: Context [/Bank_Report] startup failed due to previous errors
2011-12-16 0:48:00 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: The web application [/Bank_Report] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@1bfbe18]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@1593225]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
2011-12-16 0:48:00 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: The web application [/Bank_Report] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@7c9586]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@13cbbbf]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
2011-12-16 0:48:00 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory docs
2011-12-16 0:48:00 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory examples
2011-12-16 0:48:01 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2011-12-16 0:48:01 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2011-12-16 0:48:01 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ROOT
2011-12-16 0:48:01 org.apache.coyote.http11.Http11AprProtocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2011-12-16 0:48:01 org.apache.coyote.ajp.AjpAprProtocol start
信息: Starting Coyote AJP/1.3 on ajp-8009
2011-12-16 0:48:01 org.apache.catalina.startup.Catalina start
信息: Server startup in 4640 ms
加载中
0
杨松坤
杨松坤

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
        "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
 <!-- 设置Action的请求后缀为.action,防止Struts2.1将无后缀请求亦当成正常的Action请求处理 -->
 <constant name="struts.action.extension" value="action"/>
 <!-- 设置Web应用的默认编码集-->

 <!-- 设置Struts2.1应用是否处于开发模式,通常在开发调试阶段设为true,正式上线后可设为false -->
 
    <package name="bankreport" extends="struts-default">
    <action name="basictable" class="bankreport.action.BasicReport" method="listBasicTable">
    <result>/basictable.jsp</result>
    </action>
  
    </package>
   
</struts>

0
杨松坤
杨松坤
<?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">
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
 
 <!-- 配置404与500错误处理 -->   
 <error-page>
  <error-code>404</error-code>
  <location>/404.htm</location>
 </error-page>
 <error-page>
  <error-code>500</error-code>
  <location>/500.htm</location>
 </error-page>
 
 <filter>
 <filter-name>struts2</filter-name>
  <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
 </filter>
 <filter-mapping>
  <filter-name>struts2</filter-name>
  <url-pattern>/*</url-pattern>
 </filter-mapping>
</web-app>
0
f0rb
f0rb

在web.xml里面加上

<listener>
     <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

返回顶部
顶部