`
aa8945163
  • 浏览: 276108 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

异常Caught exception while loading file struts-default.xml - [unknown location]解决办

阅读更多
Struts2出现异常Caught exception while loading file struts-default.xml - [unknown location]解决办法

Caught exception while loading file struts-default.xml - [unknown location]
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:839)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:131)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:100)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:130)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:205)
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:3800)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4450)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1173)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1271)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:296)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:619)
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:213)
at com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:198)
at com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:189)
at com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:175)
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:115)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:830)
... 21 more

解决办法:将Hibernate Core Libraries下的xerces-2.6.2.jar文件删除(版本不一定相同)或者在lib目录中删除,然后把服务器部署过的此项目也删掉,重新部署一下,应该没问题了。
分享到:
评论
1 楼 xiaobadi 2012-06-19  
3q哦 

相关推荐

    tomcat部署多个项目.pdf

    `Caught exception while loading file struts-default.xml - [unknown location]` 这个异常是因为 Struts 框架中的配置文件 `struts-default.xml` 无法正确地加载。 解决方法 2:配置 Struts 框架 要解决这个...

    配置struts2常见错误

    Caught exception while loading file struts-default.xml - [unknown location] ``` **解决方法**: 这个错误通常由库文件冲突引起,比如多个版本的`xml-apis.jar`或`xerces-2.6.2.jar`文件同时存在。为了解决这个...

    VC-P-P-exception-handling-documents.zip_异常处理

    "VC/C++源码, FileException" 提供了一个学习VC++异常处理机制的实例,这对于初学者来说是极具价值的。 在C++中,异常处理是通过`try`、`catch`和`throw`关键字来实现的。当程序在`try`块中遇到无法正常处理的错误...

    [Content_Types].xml[Content_Types].xml[Content_Types].xml

    [Content_Types].xml[Content_Types].xml[Content_Types].xml[Content_Types].xml[Content_Types].xml[Content_Types].xml[Content_Types].xml[Content_Types].xml[Content_Types].xml

    01-ErrorShow.rar_visual c

    std::cerr &lt;&lt; "Caught an exception: " &lt;&lt; e.what() ; } } ``` 在这个例子中,如果`b`为0,函数会抛出一个`std::invalid_argument`异常,然后在`catch`块中捕获并打印错误信息。 除了标准库提供的异常类型,我们...

    input-caught.rar_Caught

    在给定的"input-caught.rar_Caught"压缩包中,我们可以看到一个名为"输入捕捉通道7.c"的源代码文件,这暗示了该代码是针对特定单片机的输入捕捉功能实现,很可能是用于飞思卡尔(Freescale,现已被NXP半导体收购)的...

    2019高考英语新课件二轮练习精品测试卷5unit3.doc

    caught sight 看见 - C. out of sight 看不见 - D. lost sight of 看不见了;失去视野 句子表示跟踪小偷半小时后,他们在大百货商店里看不见他了,所以正确答案是D. lost sight of。 5. **介词短语辨析**: -...

    湖南省衡阳县2018 2019学年高二英语12月月考试题(扫描版).doc

    caught - 66. to stop - 67. riding - 68. a - 69. mine - 70. suddenly 5. **短文改错**: 这是一种检查学生语法和用词准确性的练习,下面是给出的错误及其纠正: - 1. 将"Get"改为"Getting",动名词形式...

    小学英语专项练习动词.doc

    18. catch - caught 19. fall - fell 20. do - did 21. buy - bought 22. see - saw 23. shop - shopped 24. begins - began 25. e - ate 26. take - took 27. miss - missed 28. like - liked 29. get - got 30. ...

    No-callback-form-caught.rar_Caught

    标题中的"No-callback-form-caught"暗示我们将探讨一种不依赖回调函数的网络抓包方法。下面将详细介绍这种技术以及其背后的原理。 网络抓包通常涉及到网络层协议,如TCP/IP协议栈,它允许我们查看原始的数据包,...

    Activiti-in-Action.pdf

    the Activiti Engine, and starting in a new job, that time caught up with me. After I had settled in a bit, I took up the writing task again and began working on the remaining chapters. So here I am, ...

    广东天河中学2021高考英语语法一轮复习基础训练:定语从句02 Word版含答案.docx

    5. **题目**:When he was working there he caught a serious illness from _______ efforts he still suffers. - A. which - B. that - C. whose - D. what - **解析**:此题考查关系代词的使用。“whose”...

    netty-4.0.41-2016-9-29官网下载

    5. **强大的异常处理**:Netty提供了强大的异常处理机制,如ChannelInboundHandlerAdapter中的exceptionCaught方法,可以捕获并处理各种网络异常。 6. **灵活的缓冲区**:Netty自定义了ByteBuf作为数据缓冲区,支持...

    netty-all-4.0.0.Final-source

    6. **强大的异常处理**:Netty提供了一种统一的异常处理机制,通过ChannelInboundHandlerAdapter中的exceptionCaught方法捕获和处理异常,增强了系统的健壮性。 7. **兼容性和稳定性**:Netty 4.0版本是一个成熟的...

    java基础知识测试题

    ` 执行时,会抛出异常,然后进入 `catch` 块捕获这个异常,并打印 "Caught in main()"。由于 `throws Exception` 已经声明在 `main` 方法上,所以程序不会终止,但是 `System.out.println("nothing");` 在 `catch` ...

    英语动词不规则变化表--origin.doc

    4. "catch"(抓住):catch, caught, caught A-B-A型动词的变化则是在过去式和过去分词之间有一个不规则变化。例如: 1. "overcome"(克服):overcome, overcame, overcome 2. "become"(变成):become, became, ...

    Could not perform operation -- unexpected exception. Unexpected failure (8000ff

    该问题出现在CreateGalaxy.cpp源文件的第779行,并且在同一文件的第939行和第941行处也捕捉到了相同的异常。 #### 二、错误分析与原因探究 ##### 2.1 错误代码分析 错误提示中的“Unexpected failure (8000ffff)...

    triton-2.1.0-cp310-cp310-win-amd64.whl

    triton-2.1.0-cp310-cp310-win-amd64.whl

Global site tag (gtag.js) - Google Analytics