Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Dispatcher initialization failed with struts-2.3.1.1

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Here is the Error displayed in the console of the Eclipse when trying to run a simple struts webapp with struts-2.3.1.1 jars. Please help me on this.


Dec 3, 2013 3:30:58 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: D:\Java\jdk1.6.0_32\bin;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;D:/Java/jdk1.6.0_32/bin/../jre/bin/server;D:/Java/jdk1.6.0_32/bin/../jre/bin;D:/Java/jdk1.6.0_32/bin/../jre/lib/amd64;D:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft\Web Platform Installer\;D:\Java\jdk1.6.0_32\bin;D:\Java\jdk1.6.0_32\jre\bin;D:\ATG\ATG10.2\MySQL\win32\bin;D:\aspectj1.6\bin;D:\Java\eclipse-jee-kepler-SR1-win32-x86_64\eclipse;;.
Dec 3, 2013 3:30:58 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Struts2Starer' did not find a matching property.
Dec 3, 2013 3:30:58 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Dec 3, 2013 3:30:58 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Dec 3, 2013 3:30:58 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 451 ms
Dec 3, 2013 3:30:58 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Dec 3, 2013 3:30:58 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
Dec 3, 2013 3:30:59 PM org.apache.tomcat.websocket.server.WsSci onStartup
INFO: JSR 356 WebSocket (Java WebSocket 1.0) support is not available when running on Java 6. To suppress this message, run Tomcat on Java 7, remove the WebSocket JARs from $CATALINA_HOME/lib or add the WebSocketJARs to the tomcat.util.scan.DefaultJarScanner.jarsToSkip property in $CATALINA_BASE/conf/catalina.properties. Note that the deprecated Tomcat 7 WebSocket API will be available.
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-default.xml]
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Unable to locate configuration files of the name struts-plugin.xml, skipping
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-plugin.xml]
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts.xml]
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for class com.opensymphony.xwork2.ObjectFactory
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for class com.opensymphony.xwork2.conversion.impl.XWorkConverter
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for interface com.opensymphony.xwork2.TextProvider
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for interface com.opensymphony.xwork2.ActionProxyFactory
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for interface com.opensymphony.xwork2.conversion.ObjectTypeDeterminer
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for interface org.apache.struts2.dispatcher.mapper.ActionMapper
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (jakarta) for interface org.apache.struts2.dispatcher.multipart.MultiPartRequest
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for class org.apache.struts2.views.freemarker.FreemarkerManager
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for interface org.apache.struts2.components.UrlRenderer
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for interface com.opensymphony.xwork2.validator.ActionValidatorManager
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for interface com.opensymphony.xwork2.util.ValueStackFactory
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for interface com.opensymphony.xwork2.util.reflection.ReflectionProvider
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for interface com.opensymphony.xwork2.util.reflection.ReflectionContextFactory
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for interface com.opensymphony.xwork2.util.PatternMatcher
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for interface org.apache.struts2.dispatcher.StaticContentLoader
Dec 3, 2013 3:30:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for interface com.opensymphony.xwork2.UnknownHandlerManager
Dec 3, 2013 3:31:00 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
SEVERE: Dispatcher initialization failed
Unable to load configuration. - action - file:/D:/Java/apache-tomcat-7.0.47-windows-x64/apache-tomcat-7.0.47/wtpwebapps/Struts2Starer/WEB-INF/classes/struts.xml:11:73
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:436)
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.initFilter(ApplicationFilterConfig.java:281)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4775)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5452)
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(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: Action class [org.arun.learning.ActionTutorial] not found - action - file:/D:/Java/apache-tomcat-7.0.47-windows-x64/apache-tomcat-7.0.47/wtpwebapps/Struts2Starer/WEB-INF/classes/struts.xml:11:73
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:426)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:370)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:487)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:278)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:204)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
... 17 more
Dec 3, 2013 3:31:00 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
Unable to load configuration. - action - file:/D:/Java/apache-tomcat-7.0.47-windows-x64/apache-tomcat-7.0.47/wtpwebapps/Struts2Starer/WEB-INF/classes/struts.xml:11:73
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:449)
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.initFilter(ApplicationFilterConfig.java:281)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4775)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5452)
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(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: Unable to load configuration. - action - file:/D:/Java/apache-tomcat-7.0.47-windows-x64/apache-tomcat-7.0.47/wtpwebapps/Struts2Starer/WEB-INF/classes/struts.xml:11:73
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:436)
... 15 more
Caused by: Action class [org.arun.learning.ActionTutorial] not found - action - file:/D:/Java/apache-tomcat-7.0.47-windows-x64/apache-tomcat-7.0.47/wtpwebapps/Struts2Starer/WEB-INF/classes/struts.xml:11:73
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:426)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:370)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:487)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:278)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:204)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
... 17 more
Dec 3, 2013 3:31:00 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error filterStart
Dec 3, 2013 3:31:00 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Struts2Starer] startup failed due to previous errors
Dec 3, 2013 3:31:00 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/Struts2Starer] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@372943ac]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@7619ed7e]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Dec 3, 2013 3:31:00 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/Struts2Starer] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@203727c5]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@5140709]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Dec 3, 2013 3:31:00 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Java\apache-tomcat-7.0.47-windows-x64\apache-tomcat-7.0.47\webapps\docs
Dec 3, 2013 3:31:00 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Java\apache-tomcat-7.0.47-windows-x64\apache-tomcat-7.0.47\webapps\examples
Dec 3, 2013 3:31:00 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Dec 3, 2013 3:31:00 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Dec 3, 2013 3:31:00 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@192425a')
Dec 3, 2013 3:31:00 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Java\apache-tomcat-7.0.47-windows-x64\apache-tomcat-7.0.47\webapps\host-manager
Dec 3, 2013 3:31:00 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Java\apache-tomcat-7.0.47-windows-x64\apache-tomcat-7.0.47\webapps\manager
Dec 3, 2013 3:31:00 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Java\apache-tomcat-7.0.47-windows-x64\apache-tomcat-7.0.47\webapps\ROOT
Dec 3, 2013 3:31:00 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Dec 3, 2013 3:31:00 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Dec 3, 2013 3:31:00 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1947 ms



Here is the web.xml and struts.xml files



web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns="http://java.sun.com/xml/ns/javaee"; xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; id="WebApp_ID" version="3.0">
<display-name>Struts2Starer</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>

<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>


struts.xml

<?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>

<package name="default" extends="struts-default">

<action name="getTutorial" class="org.arun.learning.ActionTutorial">

<result name="success">/success.jsp</result>
<result name="error">/error.jsp</result>
</action>

</package>


</struts>


 
Bartender
Posts: 9612
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like Struts can't find an action class.

Caused by: Action class [org.arun.learning.ActionTutorial] not found - action - file:/D:/Java/apache-tomcat-7.0.47-windows-x64/apache-tomcat-7.0.47/wtpwebapps/Struts2Starer/WEB-INF/classes/struts.xml:11:73

    Bookmark Topic Watch Topic
  • New Topic