Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Struts 2 framework demo

Tags:

java

jsp

struts2

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 Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Dell\DW WLAN Card;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\Java\jdk1.7.0_25\bin;C:\Program Files\TortoiseSVN\bin;C:\MATLAB7\bin\win32;C:\Program Files\MATLAB\R2011a\runtime\win64;C:\Program Files\MATLAB\R2011a\bin;.
    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

like image 785
astack Avatar asked Dec 15 '22 03:12

astack


2 Answers

You are missing commons-lang3-3.1.jar (needed in Struts 2.3, not in lower versions).

You can (and should) use it along with commons-lang-2.6.jar, because their packages are different.

Look in the Apache documentation to see all the Struts2 dependencies.

Download link for both commons-lang versions.

like image 74
Andrea Ligios Avatar answered Dec 17 '22 17:12

Andrea Ligios


please make sure that your struts.xml action class mapping is correct

like image 27
Sanjay Nagare Avatar answered Dec 17 '22 16:12

Sanjay Nagare