严重: exception starting filter struts2 caught exception while loading file struts-凯发k8网页登录

苟有恒,何必三更起五更眠;
最无益,只怕一日曝十日寒.
posts - 241, comments - 318, trackbacks - 0, articles - 16
posted on 2008-09-23 21:49 xcp 阅读(13938) 评论(16)     所属分类: struts2
今天下午做了一个ssh项目,是利用spring配置文件管理hibernate配置文件,结果一发布出现以下错误,请高手们指教!!!!
严重: exception starting filter struts2
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:201)
 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.(applicationfilterconfig.java:108)
 at org.apache.catalina.core.standardcontext.filterstart(standardcontext.java:3709)
 at org.apache.catalina.core.standardcontext.start(standardcontext.java:4356)
 at org.apache.catalina.core.containerbase.addchildinternal(containerbase.java:791)
 at org.apache.catalina.core.containerbase.addchild(containerbase.java:771)
 at org.apache.catalina.core.standardhost.addchild(standardhost.java:525)
 at org.apache.catalina.startup.hostconfig.deploydirectory(hostconfig.java:924)
 at org.apache.catalina.startup.hostconfig.deploydirectories(hostconfig.java:887)
 at org.apache.catalina.startup.hostconfig.deployapps(hostconfig.java:492)
 at org.apache.catalina.startup.hostconfig.start(hostconfig.java:1147)
 at org.apache.catalina.startup.hostconfig.lifecycleevent(hostconfig.java:311)
 at org.apache.catalina.util.lifecyclesupport.firelifecycleevent(lifecyclesupport.java:117)
 at org.apache.catalina.core.containerbase.start(containerbase.java:1053)
 at org.apache.catalina.core.standardhost.start(standardhost.java:719)
 at org.apache.catalina.core.containerbase.start(containerbase.java:1045)
 at org.apache.catalina.core.standardengine.start(standardengine.java:443)
 at org.apache.catalina.core.standardservice.start(standardservice.java:516)
 at org.apache.catalina.core.standardserver.start(standardserver.java:710)
 at org.apache.catalina.startup.catalina.start(catalina.java:578)
 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: java.lang.classcastexception: org.apache.xerces.parsers.xml11configuration cannot be cast to org.apache.xerces.xni.parser.xmlparserconfiguration
 at org.apache.xerces.parsers.domparser.(unknown source)
 at org.apache.xerces.parsers.domparser.(unknown source)
 at org.apache.xerces.jaxp.documentbuilderimpl.(unknown source)
 at org.apache.xerces.jaxp.documentbuilderfactoryimpl.newdocumentbuilder(unknown source)
 at com.sun.org.apache.xalan.internal.xsltc.trax.sax2dom.(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:213)
 at com.opensymphony.xwork2.util.domhelper$dombuilder.(domhelper.java:198)
 at com.opensymphony.xwork2.util.domhelper$dombuilder.(domhelper.java:189)
 at com.opensymphony.xwork2.util.domhelper$dombuilder.(domhelper.java:175)
 at com.opensymphony.xwork2.util.domhelper.parse(domhelper.java:115)
 at com.opensymphony.xwork2.config.providers.xmlconfigurationprovider.loadconfigurationfiles(xmlconfigurationprovider.java:830)
 ... 34 more

请高手们指教????


名称: ♪4c.esl | .↗evon
口号: 遇到新问题♪先要寻找一个方案乄而不是创造一个方案こ
mail:


feedback

# re: 严重: exception starting filter struts2 caught exception while loading file struts-default.xml  回复     

2008-09-23 21:58 by
ms这个错误是struts2的一个bug,以前我也遇见过

# re: 严重: exception starting filter struts2 caught exception while loading file struts-default.xml  回复     

2008-09-24 11:19 by
看看struts-default.xml 的位置放对没有

# re: 严重: exception starting filter struts2 caught exception while loading file struts-default.xml  回复     

2008-09-25 09:22 by xcp
@游四海
@fx
谢谢你们哈,我已经找到错误的原因了.打了半天,发现有一个caused by: java.lang.classcastexception: org.apache.xerces.parsers.xml11configuration cannot be cast to org.apache.xerces.xni.parser.xmlparserconfiguration错误。我一想肯定是导入的包有问题,结果一看导入的包里面有一个xerces.jar,我也只是想试一试,就把这个包删掉,重新发布、运行发现不报错误了。在一次谢谢各位了哈!!

# re: 严重: exception starting filter struts2 caught exception while loading file struts-default.xml  回复     

2009-01-22 18:15 by
为什么我照着视频做的一模一样他是对的,而我是错的!

# re: 严重: exception starting filter struts2 caught exception while loading file struts-default.xml  回复     

2009-02-25 22:15 by
只要照着下载的struts2的包里給的空白的例子里他所导入的包导入就一定不会错

# re: 严重: exception starting filter struts2 caught exception while loading file struts-default.xml  回复     

2009-07-31 17:55 by
我没有那个包也是报这样的错啊!

# re: 严重: exception starting filter struts2 caught exception while loading file struts-default.xml  回复     

2009-08-29 00:14 by
@xcp
真的 是这个原因啊!!应该是包和包之前有冲突,我在做ssh2整合时也碰到这个情况,用myeclipse自动导入了hibernate和spring的包,也不知道xerces.jary这个是什么时候进来的,结果删了xerces.jar就可以了.

# re: 严重: exception starting filter struts2 caught exception while loading file struts-default.xml[未登录]  回复     

2010-03-09 16:26 by
我也遇到这样的问题,解决啦!在status2里面多了一个标签!

# re: 严重: exception starting filter struts2 caught exception while loading file struts-default.xml  回复     

2010-03-18 21:28 by
我也移除那个包了,但还是那个错误啊

# re: 严重: exception starting filter struts2 caught exception while loading file struts-default.xml  回复     

2010-03-18 21:29 by
我也移除那个包了,但还是那个错误啊 为什么呢?请教哪位高手帮忙解决
qq295833641

# re: 严重: exception starting filter struts2 caught exception while loading file struts-default.xml  回复     

2010-03-31 15:43 by
是啊,我也是啊

# re: 严重: exception starting filter struts2 caught exception while loading file struts-default.xml  回复     

2010-07-29 14:42 by
struts2-core.jar
xwork.jar
ognl.jar
freemarker.jar
commons-logging.jar
commons-io-1.3.1.jar
commons-fileupload-1.2.jar
将这些jar都导进去试试

# re: 严重: exception starting filter struts2 caught exception while loading file struts-default.xml  回复     

2010-08-03 10:19 by
我也是删了xerces.jar就可以了。

# re: 严重: exception starting filter struts2 caught exception while loading file struts-default.xml  回复     

2010-08-05 21:12 by
@dsdds
我也是删了xerces.jar就可以了,我想问问,这个jar是干什么用的呢?

# re: 严重: exception starting filter struts2 caught exception while loading file struts-default.xml  回复     

2012-03-04 18:04 by
要删除xerces.jar和xml-apis.jar这是应为hibernate的这两个包的功能和jdk的冲突了

# re: 严重: exception starting filter struts2 caught exception while loading file struts-default.xml  回复     

2015-07-09 01:42 by
我额也是报这样的错误,但是我没有xerces.jar这个包,但我有xml-apis.jar这个包,我删除了,还是报同样的错误,这是什么原因?

只有注册用户后才能发表评论。


网站导航:
              
 
网站地图