struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Hoy (JIRA)" <j...@apache.org>
Subject [jira] Updated: (WW-3249) Placing more than one Struts2 application in the same container causes a failure to start when one or more contains Xalan 2 JAR
Date Tue, 15 Sep 2009 22:03:33 GMT

     [ https://issues.apache.org/struts/browse/WW-3249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Joe Hoy updated WW-3249:
------------------------

    Description: 
If I try to place two applications using Struts2 in the same container and one or more of
them requires Xalan, I get this.  I'm using Guice as the DI engine:

I've tried taking Xalan out of the WARs - unfortunately one of the apps does require it, as
it uses Apache Digester, and I've also tried adding the Xalan jar to Jetty's /lib directory
instead of putting it in the WAR and there's still the same problem.


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:360)
	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
	at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:48)
	at com.google.inject.servlet.FilterDefinition.init(FilterDefinition.java:83)
	at com.google.inject.servlet.ManagedFilterPipeline.initPipeline(ManagedFilterPipeline.java:102)
	at com.google.inject.servlet.GuiceFilter.init(GuiceFilter.java:168)
	at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:653)
	at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
	at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1239)
	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
	at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:466)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
	at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
	at org.mortbay.jetty.Server.doStart(Server.java:224)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.mortbay.start.Main.invokeMain(Main.java:194)
	at org.mortbay.start.Main.start(Main.java:534)
	at org.mortbay.start.Main.start(Main.java:441)
	at org.mortbay.start.Main.main(Main.java:119)
Caused by: Caught exception while loading file struts-default.xml - [unknown location]
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:894)
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:144)
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:111)
	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:164)
	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
	... 32 more
Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.XML11Configuration 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:885)
	... 36 more

Obviously this is a pretty serious issue - I can't find it anywhere in here. 

Of course, I could be doing something stupid, so if that's the case please let me know!

Thanks a million,

JHoy

  was:
If I try to place two applications using Struts2 in the same container and one or more of
them requires Xalan, I get this.  I'm using Guice as the DI engine:

I've tried taking Xalan out of the WARs - unfortunately one of the apps does require it, as
it uses Apache Digester, and I've also tried adding the Xalan jar to Jetty's /lib directory
instead of putting it in the WAR and there's still the same problem.


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:360)
	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
	at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:48)
	at com.google.inject.servlet.FilterDefinition.init(FilterDefinition.java:83)
	at com.google.inject.servlet.ManagedFilterPipeline.initPipeline(ManagedFilterPipeline.java:102)
	at com.google.inject.servlet.GuiceFilter.init(GuiceFilter.java:168)
	at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:653)
	at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
	at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1239)
	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
	at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:466)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
	at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
	at org.mortbay.jetty.Server.doStart(Server.java:224)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.mortbay.start.Main.invokeMain(Main.java:194)
	at org.mortbay.start.Main.start(Main.java:534)
	at org.mortbay.start.Main.start(Main.java:441)
	at org.mortbay.start.Main.main(Main.java:119)
Caused by: Caught exception while loading file struts-default.xml - [unknown location]
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:894)
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:144)
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:111)
	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:164)
	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
	... 32 more
Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.XML11Configuration 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:885)
	... 36 more

Obviously this is a pretty serious issue - I can't find it anywhere in here. 

Of course, I could be doing something stupid, so if that's the case please let me know!

Thanks a million,

Joe Hoy

Developer, Nature


> Placing more than one Struts2 application in the same container causes a failure to start
when one or more contains Xalan 2 JAR
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3249
>                 URL: https://issues.apache.org/struts/browse/WW-3249
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.1.6
>         Environment: Same problem applies across both Windows and Linux on Intel hardware
>            Reporter: Joe Hoy
>            Priority: Critical
>
> If I try to place two applications using Struts2 in the same container and one or more
of them requires Xalan, I get this.  I'm using Guice as the DI engine:
> I've tried taking Xalan out of the WARs - unfortunately one of the apps does require
it, as it uses Apache Digester, and I've also tried adding the Xalan jar to Jetty's /lib directory
instead of putting it in the WAR and there's still the same problem.
> 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:360)
> 	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
> 	at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
> 	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:48)
> 	at com.google.inject.servlet.FilterDefinition.init(FilterDefinition.java:83)
> 	at com.google.inject.servlet.ManagedFilterPipeline.initPipeline(ManagedFilterPipeline.java:102)
> 	at com.google.inject.servlet.GuiceFilter.init(GuiceFilter.java:168)
> 	at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
> 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> 	at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:653)
> 	at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
> 	at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1239)
> 	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
> 	at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:466)
> 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> 	at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
> 	at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
> 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> 	at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
> 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> 	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
> 	at org.mortbay.jetty.Server.doStart(Server.java:224)
> 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> 	at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.mortbay.start.Main.invokeMain(Main.java:194)
> 	at org.mortbay.start.Main.start(Main.java:534)
> 	at org.mortbay.start.Main.start(Main.java:441)
> 	at org.mortbay.start.Main.main(Main.java:119)
> Caused by: Caught exception while loading file struts-default.xml - [unknown location]
> 	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:894)
> 	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:144)
> 	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:111)
> 	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:164)
> 	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
> 	... 32 more
> Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.XML11Configuration
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:885)
> 	... 36 more
> Obviously this is a pretty serious issue - I can't find it anywhere in here. 
> Of course, I could be doing something stupid, so if that's the case please let me know!
> Thanks a million,
> JHoy

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message