本文介绍了Struts 2 框架演示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!
问题描述
在服务器上部署应用程序时出现错误日志.
Error log while deploying application on server.
Dec 19, 2013 5:26:00 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:Program FilesJavajre7in;C:WindowsSunJavain;C:Windowssystem32;C:Windows;C:Program FilesDellDW WLAN Card;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)IntelOpenCL SDK2.0inx86;C:Program Files (x86)IntelOpenCL SDK2.0inx64;C:Program FilesWIDCOMMBluetooth Software;C:Program FilesWIDCOMMBluetooth Softwaresyswow64;C:Program FilesJavajdk1.7.0_25in;C:Program FilesTortoiseSVNin;C:MATLAB7inwin32;C:Program FilesMATLABR2011a
untimewin64;C:Program FilesMATLABR2011ain;.
Dec 19, 2013 5:26:01 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:StrutsDemo' did not find a matching property.
Dec 19, 2013 5:26:01 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Dec 19, 2013 5:26:01 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Dec 19, 2013 5:26:01 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1834 ms
Dec 19, 2013 5:26:02 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Dec 19, 2013 5:26:02 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.34
Dec 19, 2013 5:26:02 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [231] milliseconds.
Dec 19, 2013 5:26:04 PM com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
INFO: Parsing configuration file [struts-default.xml]
Dec 19, 2013 5:26:04 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:211)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:234)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:278)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:259)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:104)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
... 22 more
Dec 19, 2013 5:26:04 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error filterStart
Dec 19, 2013 5:26:04 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/StrutsDemo] startup failed due to previous errors
Dec 19, 2013 5:26:04 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Dec 19, 2013 5:26:04 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Dec 19, 2013 5:26:04 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2483 ms
请提供一些解决方案,在此先感谢
Please provide with some solution, Thanks in advance
推荐答案
你缺少 commons-lang3-3.1.jar
(Struts 2.3 需要,低版本不需要).
You are missing commons-lang3-3.1.jar
(needed in Struts 2.3, not in lower versions).
您可以(并且应该)将它与 commons-lang-2.6.jar
一起使用,因为它们的包不同.
You can (and should) use it along with commons-lang-2.6.jar
, because their packages are different.
查看 Apache 文档以查看 所有 Struts2 依赖项.
Look in the Apache documentation to see all the Struts2 dependencies.
下载链接 两个 commons-lang代码> 版本.
这篇关于Struts 2 框架演示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!
本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!