`

jboss 5 报错:Failed to create a new SAX parser 解决办法 (转载))

 
阅读更多

一个项目,在TOMCAT下运行正常,但移植到JBOSS5下就报错:

10:45:52,109 ERROR [JBossContextConfig] XML error parsing: context.xml
org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser
at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:100)
at org.jboss.web.tomcat.service.deployers.JBossContextConfig.processContextConfig(JBossContextConfig.java:549)
at org.jboss.web.tomcat.service.deployers.JBossContextConfig.init(JBossContextConfig.java:536)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:279)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.StandardContext.init(StandardContext.java:5436)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4148)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at $Proxy38.start(Unknown Source)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
at org.jboss.system.ServiceController.start(ServiceController.java:460)
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.jboss.xb.binding.JBossXBException: Failed to create a new SAX parser
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:97)
at org.jboss.xb.binding.UnmarshallerImpl.<init>(UnmarshallerImpl.java:56)
at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:96)
... 73 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.SAXParser.<init>(Unknown Source)
at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.<init>(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source)
at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:92)
... 75 more



很奇怪,经过千辛万苦的查找原因,最终把它解决了。
解决办法:删掉项目中的xerces-2.6.2.jar和xml-apis.jar两个文件!

分享到:
评论

相关推荐

    Maven项目部署到Jboss出现Failed to create a new SAX parser

    总之,解决“Failed to create a new SAX parser”的关键在于理解Maven的依赖管理和Jboss的类加载机制,以及正确处理潜在的库冲突。遵循上述步骤,可以有效地解决这个问题,确保Maven项目在Jboss上的顺利部署。希望...

    Jboss启动报Failed to parse WEB-INFweb.xml; - nested throwable错误

    Jboss启动报Failed to parse WEB-INF/web.xml; - nested throwable错误解决方案 在Jboss应用服务器中,启动报错Failed to parse WEB-INF/web.xml; - nested throwable是一种常见的错误,本文将对此错误进行深入分析...

    jboss-logging-3.4.1.Final-API文档-中文版.zip

    赠送jar包:jboss-logging-3.4.1.Final.jar; 赠送原API文档:jboss-logging-3.4.1.Final-javadoc.jar; 赠送源代码:jboss-logging-3.4.1.Final-sources.jar; 赠送Maven依赖信息文件:jboss-logging-3.4.1.Final....

    jboss-logging-3.4.3.Final-API文档-中文版.zip

    赠送jar包:jboss-logging-3.4.3.Final.jar; 赠送原API文档:jboss-logging-3.4.3.Final-javadoc.jar; 赠送源代码:jboss-logging-3.4.3.Final-sources.jar; 赠送Maven依赖信息文件:jboss-logging-3.4.3.Final....

    jboss-logging-3.3.2.Final-API文档-中文版.zip

    赠送jar包:jboss-logging-3.3.2.Final.jar; 赠送原API文档:jboss-logging-3.3.2.Final-javadoc.jar; 赠送源代码:jboss-logging-3.3.2.Final-sources.jar; 赠送Maven依赖信息文件:jboss-logging-3.3.2.Final....

    jboss-logging-3.4.2.Final-API文档-中文版.zip

    赠送jar包:jboss-logging-3.4.2.Final.jar; 赠送原API文档:jboss-logging-3.4.2.Final-javadoc.jar; 赠送源代码:jboss-logging-3.4.2.Final-sources.jar; 赠送Maven依赖信息文件:jboss-logging-3.4.2.Final....

    JBoss at Work: A Practical Guide

    《JBoss at Work: A Practical Guide》是一本深入解析JBoss应用服务器的实践指南,它为读者提供了在实际工作中使用JBoss的全面指导。JBoss是Red Hat公司开发的一个开源Java应用服务器,它基于Java EE(Java ...

    Manning JBoss in Action: Configuring the JBoss Application Server

    This book walks readers through the JBoss 5 Application Server from installation to configuration to production development. It shows how to configure the server's various component containers such as...

    xnio-nio-3.8.0.Final-API文档-中文版.zip

    Maven坐标:org.jboss.xnio:xnio-nio:3.8.0.Final; 标签:jboss、xnio、nio、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的...

    JBoss in Action: Configuring the JBoss Application Server

    ### JBoss in Action: Configuring the JBoss Application Server #### 关键知识点概览 - **JBoss Application Server**: 一种开源的应用服务器,适用于Java应用程序的部署与管理。 - **JBoss in Action**: 一本...

    JBOSS 5启动报错

    NULL 博文链接:https://zhangxing119.iteye.com/blog/691383

    jboss-exp.rar

    5.远程删除文件D:\jboss\server\default\deploy\management\myname.war\index.jsp文件 java -jar jboss_exploit_fat.jar -i ...

    xnio-api-3.8.0.Final-API文档-中文版.zip

    Maven坐标:org.jboss.xnio:xnio-api:3.8.0.Final; 标签:jboss、xnio、api、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的...

    JBoss Config GUI : Version 0.6.0 Beta 4

    JBoss Config GUI 版本 0.6.0 Beta 4 是一个专为管理JBoss应用服务器配置而设计的图形用户界面工具。该版本作为Java平台上的应用,旨在简化JBoss服务器的配置过程,使非技术人员也能更方便地操作。通过提供直观的...

    java.lang.UnsupportedClassVersionError问题的解决方法

    ### java.lang.UnsupportedClassVersionError问题的解决方法 在开发Java应用程序的过程中,经常会遇到与JDK版本不兼容的问题,其中一种常见的异常就是`java.lang.UnsupportedClassVersionError`。该错误通常发生在...

    jboss_exploit_fat

    5.远程删除文件D:\jboss\server\default\deploy\management\myname.war\index.jsp文件 java -jar jboss_exploit_fat.jar -i ...

    jbosscache-core-3.2.5.GA-all.zip

    jbosscache-core-3.2.5.GA-all.zip 是一个包含JBoss Cache核心组件的压缩包,这个版本是3.2.5.GA,主要用于提供高性能、分布式的缓存解决方案。JBoss Cache,也被称为Infinispan前身的一部分,是JBoss企业中间件的一...

    jboss-threads-3.1.0.Final-API文档-中文版.zip

    赠送jar包:jboss-threads-3.1.0.Final.jar; 赠送原API文档:jboss-threads-3.1.0.Final-javadoc.jar; 赠送源代码:jboss-threads-3.1.0.Final-sources.jar; 赠送Maven依赖信息文件:jboss-threads-3.1.0.Final....

    归档操作的JavaAPIShrinkwrap.zip

    glassfishPrototypingextension-jettyorg.jboss.shrinkwrap:shrinkwrap-extension-jettyPrototypingimpl-baseorg.jboss.shrinkwrap:shrinkwrap-impl-baseDevelopment In Usespiorg.jboss.shrinkwrap:shrinkwrap-...

    jboss 7.1.1 Final 的jsp热部署解决方案

    in 7.1.1 we have included much reworked web subsystem but unfortunaly I missed a bit that coused all jsp configuration to be ignored. That bug was fixed soon after 7.1.1 was released and is now part ...

Global site tag (gtag.js) - Google Analytics