Tomcat启动异常——Unable to load configuration. - [unknown location]
15:26:28,427 INFO SessionFactoryImpl:161 - building session factory15:26:28,646 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured15:26:28,895 ERROR Dispatcher:38 - Dispatcher initialization failed Unable to load configuration. - [unknown location] at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415) 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:3666) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4258) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) 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:700) 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:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)Caused by: Caught exception while loading file struts-default.xml - [unknown location] at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:913) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:154) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:121) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:179) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66) ... 22 moreCaused 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:324) at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.<init>(SAX2DOM.java:84) 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:904) ... 26 more15:26:28,911 ERROR [/xnc]:3670 - Exception starting filter struts2Unable to load configuration. - [unknown location] at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:428) 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:3666) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4258) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) 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:700) 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:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)Caused by: Unable to load configuration. - [unknown location] at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415) ... 20 moreCaused by: Caught exception while loading file struts-default.xml - [unknown location] at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:913) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:154) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:121) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:179) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66) ... 22 moreCaused 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:324) at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.<init>(SAX2DOM.java:84) 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:904) ... 26 more2012-3-16 15:26:28 org.apache.catalina.core.StandardContext start严重: Error filterStart2012-3-16 15:26:28 org.apache.catalina.core.StandardContext start严重: Context [/xnc] startup failed due to previous errors15:26:28,926 INFO SessionFactoryImpl:769 - closinglog4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.2012-3-16 15:26:29 org.apache.coyote.http11.Http11BaseProtocol start信息: Starting Coyote HTTP/1.1 on http-802012-3-16 15:26:29 org.apache.jk.common.ChannelSocket init信息: JK: ajp13 listening on /0.0.0.0:80092012-3-16 15:26:29 org.apache.jk.server.JkMain start信息: Jk running ID=0 time=0/15 config=null2012-3-16 15:26:29 org.apache.catalina.storeconfig.StoreLoader load信息: Find registry server-registry.xml at classpath resource2012-3-16 15:26:29 org.apache.catalina.startup.Catalina start信息: Server startup in 7598 ms
?
?
?? 在本地的 Tomcat 运行是好的。。放到服务器上面就出问题了。。。而且本地的Tomcat和服务器的是一样的。
??
?? 郁闷了很久。。。
???
?? 在网上查了下,话说是因为xerce.jar和xml-apis.jar这两个jar包冲突,所以解决方法。
???
?? 删除xerce.jar
?
?? 我是在 http://hi.baidu.com/yb_ping/blog/item/252d2d2bb367b426d52af145.html?这里看到的解决方案。。?
?
?? 非常感谢 yb_ping 哥的分享。。我也找了很就。。才找到。。所以我也发布下。。好让和我一样困惑的人更方便的找到解决方法。。。。。
?
???? 哈哈 。。。。。。。。至于为什么本地可以正常运行。。。就不找到了。。。先记下来。。以后遇到在说吧。。哈哈。。。
?
??