I decided to finally ask about this problem I've been seeing for
several years.
During development I will run my Struts 2 (2.1.8) apps in Tomcat
(5.5.25) from Eclipse (3.5.1). I've included the current versions I'm
using but this problem goes way back over many different versions over
a couple years.

Here's the problem, if I make any changes while the app is running
like change a properties file of change a class, Eclipse will push the
changes to the deploy area and Tomcat will see the change and attempt
to reload the application (that's all good and expected). However the
reload always fails with the exception stack below and I have to
manually stop and restart Tomcat to get it to load successfully and
see the updates.  I never had this problem with Struts 1 or even JSF,
Tomcat was always able to reload the apps automatically.

Anyone have any idea why the reload is failing and how to fix?

Here is the stack dump:

Feb 24, 2010 10:15:44 AM org.apache.catalina.loader.WebappClassLoader
findResourceInternal
INFO: Illegal access: this web application instance has been stopped
already.  Could not load
META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration.
 The eventual following stack trace is caused by an error thrown for
debugging purposes as well as to attempt to terminate the thread which
caused the illegal access, and has no functional impact.
2010-02-24 10:15:44,081 ERROR
org.apache.struts2.dispatcher.Dispatcher:27 - Dispatcher
initialization failed
Unable to load configuration. - [unknown location]
        at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
        at 
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)
        at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418)
        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:221)
        at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
        at 
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:78)
        at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
        at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)
        at 
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3025)
        at 
org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:432)
        at 
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1278)
        at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
        at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
        at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
        at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
        at java.lang.Thread.run(Thread.java:619)
Caused by: Caught exception while loading file struts-default.xml -
[unknown location]
        at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:902)
        at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:143)
        at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:110)
        at 
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:168)
        at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
        ... 17 more
Caused by: java.lang.ClassCastException:
org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be
cast to org.apache.xerces.xni.parser.XMLParserConfiguration
        at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
        at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
        at 
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown
Source)
        at 
com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.createDocument(SAX2DOM.java:326)
        at 
com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.<init>(SAX2DOM.java:85)
        at 
com.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory.getSerializationHandler(TransletOutputHandlerFactory.java:187)
        at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(TransformerImpl.java:392)
        at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerHandlerImpl.setResult(TransformerHandlerImpl.java:137)
        at 
com.opensymphony.xwork2.util.DomHelper$DOMBuilder.setup(DomHelper.java:205)
        at 
com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:190)
        at 
com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:181)
        at 
com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:167)
        at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:107)
        at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:893)
        ... 21 more
2010-02-24 10:15:46,982 ERROR
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/amsn]:3639
- Exception starting filter struts2
Unable to load configuration. - [unknown location]
        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:221)
        at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
        at 
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:78)
        at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
        at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)
        at 
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3025)
        at 
org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:432)
        at 
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1278)
        at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
        at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
        at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
        at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
        at java.lang.Thread.run(Thread.java:619)
Caused by: Unable to load configuration. - [unknown location]
        at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
        at 
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)
        at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418)
        ... 15 more
Caused by: Caught exception while loading file struts-default.xml -
[unknown location]
        at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:902)
        at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:143)
        at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:110)
        at 
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:168)
        at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
        ... 17 more
Caused by: java.lang.ClassCastException:
org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be
cast to org.apache.xerces.xni.parser.XMLParserConfiguration
        at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
        at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
        at 
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown
Source)
        at 
com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.createDocument(SAX2DOM.java:326)
        at 
com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.<init>(SAX2DOM.java:85)
        at 
com.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory.getSerializationHandler(TransletOutputHandlerFactory.java:187)
        at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(TransformerImpl.java:392)
        at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerHandlerImpl.setResult(TransformerHandlerImpl.java:137)
        at 
com.opensymphony.xwork2.util.DomHelper$DOMBuilder.setup(DomHelper.java:205)
        at 
com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:190)
        at 
com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:181)
        at 
com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:167)
        at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:107)
        at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:893)
        ... 21 more
Feb 24, 2010 10:15:49 AM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Feb 24, 2010 10:15:49 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/amsn] startup failed due to previous errors

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to