异常 Caught exception while loading file struts-default.xml - [unknown location]
严重:ExceptionstartingfilterStruts2
Caughtexceptionwhileloadingfilestruts-default.xml-[unknownlocation]
atcom.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:839)
atcom.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:131)
atcom.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:100)
atcom.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:130)
atcom.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
atorg.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
atorg.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
atorg.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
atorg.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
atorg.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
atorg.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
atorg.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3696)
atorg.apache.catalina.core.StandardContext.start(StandardContext.java:4343)
atorg.apache.catalina.core.StandardContext.reload(StandardContext.java:3086)
atorg.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:404)
atorg.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1309)
atorg.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
atorg.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
atorg.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
atorg.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
atjava.lang.Thread.run(Thread.java:619)
Causedby:java.lang.ClassCastException:org.apache.xerces.parsers.XML11Configurationcannotbecasttoorg.apache.xerces.xni.parser.XMLParserConfiguration
atorg.apache.xerces.parsers.DOMParser.<init>(UnknownSource)
atorg.apache.xerces.parsers.DOMParser.<init>(UnknownSource)
atorg.apache.xerces.jaxp.DocumentBuilderImpl.<init>(UnknownSource)
atorg.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(UnknownSource)
atcom.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.<init>(SAX2DOM.java:69)
atcom.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory.getSerializationHandler(TransletOutputHandlerFactory.java:187)
jar包有冲突,应该是XML解析包有冲突.检查发布后的WEB-INF/lib有两个XML解析包:xml-apis.jar和xerces-2.6.2.jar这种错误真正原因不是JDK6和Struts2冲突,而是MyEclipseHibernate类库中多了两个包:xml-apis.jar和xerces-2.6.2.jar,这两个包的功能和JDK的冲突了.解决办法:1.删除发布后目录的WEB-INF/lib/下的这两个文件;2.或者使用JDK1.5来启动Tomcat6.