毕业论文开发语言企业开发JAVA技术.NET技术WEB开发Linux/Unix数据库技术Windows平台移动平台嵌入式论文范文英语论文
您现在的位置: 毕业论文 >> java技术 >> 正文

startup failed due to previous errors

更新时间:2013-7-3:  来源:毕业论文

将我刚做的struts2 登陆程序配置到tomcat服务器,结果显示以下信息,应用启动失败


八月 10, 2012 3:53:40 下午 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.1.24 using APR version 1.4.6.
八月 10, 2012 3:53:40 下午 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
八月 10, 2012 3:53:41 下午 org.apache.catalina.core.AprLifecycleListener initializeSSL
信息: OpenSSL successfully initialized (OpenSSL 1.0.1c 10 May 2012)
八月 10, 2012 3:53:41 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-apr-8080"]
八月 10, 2012 3:53:41 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-apr-8009"]
八月 10, 2012 3:53:41 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1605 ms
八月 10, 2012 3:53:41 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
八月 10, 2012 3:53:41 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.29
八月 10, 2012 3:53:42 下午 com.opensymphony.xwork2.util.logging.-commons.-commonsLogger info
信息: Parsing configuration file [struts-default.xml]
八月 10, 2012 3:53:42 下午 org.apache.catalina.core.StandardContext startInternal
严重: Error filterStart
八月 10, 2012 3:53:42 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/struts2] startup failed due to previous errors
八月 10, 2012 3:53:42 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Apache\apache-tomcat-7.0.29\webapps\docs
八月 10, 2012 3:53:42 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Apache\apache-tomcat-7.0.29\webapps\examples
八月 10, 2012 3:53:42 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Apache\apache-tomcat-7.0.29\webapps\host-manager
八月 10, 2012 3:53:42 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Apache\apache-tomcat-7.0.29\webapps\manager
八月 10, 2012 3:53:42 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Apache\apache-tomcat-7.0.29\webapps\ROOT
八月 10, 2012 3:53:42 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-apr-8080"]
八月 10, 2012 3:53:42 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-apr-8009"]
八月 10, 2012 3:53:42 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 1170 ms
项目下的WEB-INF/lib下有

--commons-fileupload-1.2.2.jar
--commons-io-2.0.1.jar
--commons-logging-1.1.1.jar
--freemarker-2.3.18.jar
--javassist-3.11.0.GA.jar
--ognl-3.0.3.jar
--struts2-core-2.3.1.jar
--xwork-core-2.3.1.jar


web.xml配置信息为:
<?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">
<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>

web.xml文件没有错吧?网上有人说tomcat/common/endorsed下缺少xalan系列jar,我网上下载了还是不行,有人说tomcat5.0配置有bug,没有实现javax.servlet.Filter的Filter都会报错,我换了tomcat7.0还是有这个问题,有人说是 filter中某段代码未实例化,怎么解决,
把核心的filter改成<filter-class> org.apache.struts2.dispatcher.FilterDispatcher</filter-class> 试试看看是否能够正常启动

因为我用的struts2.3.1版本,缺少一个jar包common-lang,导入就好 了,不过纠结一整天算是找到了一个方法,就是在tomcat控制台看不到结果的时候,去tomcat/logs文件夹下看日志文件,结果发现

java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils
 
StringUtils 在common-lang包中

设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优尔论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。