Exception starting filter struts2的问题

有两个项目都集成了SSH,当把一个部署到tomcat下面运行正常,当把两个都部署到tomcat下就会发现一下的异常:

 

严重: Exception starting filter struts2
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:
371
)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:
424
)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:
213
)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:
275
)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:
397
)
    at org.apache.catalina.core.ApplicationFilterConfig.
<init>(ApplicationFilterConfig.java:108
)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:
3693
)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:
4342
)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:
761
)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:
741
)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:
525
)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:
920
)
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:
883
)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:
492
)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:
1138
)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:
311
)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:
120
)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:
1023
)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:
719
)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:
1015
)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:
443
)
    at org.apache.catalina.core.StandardService.start(StandardService.java:
448
)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:
710
)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:
552
)
    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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:
288
)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:
413
)
Caused by: Caught exception
while loading file struts-default.xml -
[unknown location]
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:
879
)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:
161
)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:
130
)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:
155
)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:
55
)
    ...
30
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.
<init>(SAX2DOM.java:69
)
    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:
212
)
    at com.opensymphony.xwork2.util.DomHelper$DOMBuilder.
<init>(DomHelper.java:197
)
    at com.opensymphony.xwork2.util.DomHelper$DOMBuilder.
<init>(DomHelper.java:188
)
    at com.opensymphony.xwork2.util.DomHelper$DOMBuilder.
<init>(DomHelper.java:174
)
    at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:
114
)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:
870
)
    ...
34
more
2008-7-25 8:09:32
org.apache.catalina.core.StandardContext start
严重: Error filterStart
2008-7-25 8:09:32
org.apache.catalina.core.StandardContext start
严重: Context [
/
workmass] startup failed due to previous errors
2008-7-25 8:09:32
org.apache.coyote.http11.Http11AprProtocol start

 

上网百度了,答案是包冲突的问题,解决办法是将项目中的xerce.jar删除,注意移除干净(lib下和引入中)

 

 

(By:Gxmis-alextang) 

你可能感兴趣的:(java,apache,tomcat,ssh,sun)