`
SilverRing
  • 浏览: 72714 次
社区版块
存档分类
最新评论

[Java] Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found

    博客分类:
  • Java
阅读更多
When unit testing a remote service with Spring today, I got an error like the one below:

org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [test/spring-organizationService.xml]; nested exception is javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
Caused by: javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
	at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
	at org.springframework.beans.factory.xml.DefaultDocumentLoader.createDocumentBuilderFactory(DefaultDocumentLoader.java:88)
	at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:70)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:351)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:280)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:173)
	at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:112)
	at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79)
	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:100)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:298)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:91)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:75)
	at org.springframework.test.AbstractSpringContextTests.loadContextLocations(AbstractSpringContextTests.java:113)
	at org.springframework.test.AbstractDependencyInjectionSpringContextTests.loadContextLocations(AbstractDependencyInjectionSpringContextTests.java:165)
	at org.springframework.test.AbstractSpringContextTests.getContext(AbstractSpringContextTests.java:95)
	at org.springframework.test.AbstractDependencyInjectionSpringContextTests.setUp(AbstractDependencyInjectionSpringContextTests.java:132)
	at junit.framework.TestCase.runBare(TestCase.java:125)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)


To resolve this, try moving JRE6 to a higher position in the compile order list.
分享到:
评论

相关推荐

    org.apache.xerces-2.9.0.jar/xerces.jar

    例如,如果你的项目使用了需要Xerces支持的库,或者你自己编写了依赖于Xerces的代码,那么你需要确保将"org.apache.xerces-2.9.0.jar"或"xerces.jar"添加到项目的类路径中。你可以通过Maven、Gradle等构建工具进行...

    com.springsource.org.apache.xerces-sources-2.8.1.jar

    jar包,官方版本,自测可用

    com.springsource.org.apache.xerces-2.9.1.jar

    jar包,官方版本,自测可用

    xerces-2.9.0.jar

    描述 "Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found" 是一个常见的错误消息,这通常意味着在运行时环境中,系统无法找到指定的 XML 解析器提供商。JAXP(Java API for XML Processing)是...

    Java中org.apache.crimson.tree开发包

    标题中的“Java中org.apache.crimson.tree开发包”指的是Apache Crimson库中的一个特定部分,即`org.apache.crimson.tree`包。这个包主要包含了用于解析和操作XML文档的类和接口。其中,`XmlDocument`类是这个包中的...

    java.lang.AbstractMethodError: org.apache.xerces.dom.DocumentImpl.setXmlVersion问题解决方法

    在这个特定的情况下,错误提示`org.apache.xerces.dom.DocumentImpl.setXmlVersion`指出问题源于Apache Xerces的DOM实现,它是一个流行的XML解析库。 `AbstractMethodError`通常意味着缺少了某个依赖或版本冲突。...

    com.springsource.org.apache.xerces-2.8.1.jar

    jar包,官方版本,自测可用

    webservice启动没有问题,通过自动生成的客户端报错

    faultCode: {... at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source ) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow n Source)

    [免费]xercesImpl-2_9_1.jar-CSDN下载

    java.lang.AbstractMethodError: org.apache.xerces.dom.ElementNSImpl.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object; at org.apache.cxf.staxutils.StaxUtil...

    apache-xml-xerces.jar.zip

    - **配置解析器**:在Java代码中,可以通过`org.apache.xerces.jaxp.DocumentBuilderFactoryImpl`或`org.apache.xerces.jaxp.SAXParserFactoryImpl`来创建并配置解析器。 - **错误处理**:解析过程中如果遇到错误,...

    javaHighcharts 导出图表的batik 等资源包

    import org.apache.batik.transcoder.Transcoder; import org.apache.batik.transcoder.TranscoderException; import org.apache.batik.transcoder.TranscoderInput; import org.apache.batik.transcoder....

    Xerces-J-src.2.10.0

    Xerces Java包: org.apache.xerces.dom——Xerces DOM实现 org.apache.xerces.parsers——Xerces解析器;DOM和SAX org.apache.xerces.serialize——将DOM树序列化到文件、输出流和编写器

    java调用net开发的webservice实例

    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283) ... 5 more 在网上查了一天的时间终于得以解决 附件中包含测试类javaAxisCallnet.java和所需的jar包

    spring-framework-3.0.5.RELEASE-dependencies-5

    org.apache.xerces org.apache.xml org.apache.xmlbeans org.apache.xmlcommons org.apache.derby org.apache.poi org.apache.struts org.apache.taglibs 5号包: org.codehaus.castor org.aspectj org.beanshell 6...

    spring-framework-3.0.5.RELEASE-dependencies-1

    org.apache.xerces org.apache.xml org.apache.xmlbeans org.apache.xmlcommons org.apache.derby org.apache.poi org.apache.struts org.apache.taglibs 5号包: org.codehaus.castor org.aspectj org.beanshell 6...

    Professional XML Development with Apache Tools.part3

    Professional XML Development with Apache Tools:Xerces,Xalan,FOP,Cocoon,Axis,Xindice 文件太大,只好分卷压缩,这是第3部分,请同时下载part2和part3至相同目录

    spring-framework-3.0.5.RELEASE-dependencies-6

    org.apache.xerces org.apache.xml org.apache.xmlbeans org.apache.xmlcommons org.apache.derby org.apache.poi org.apache.struts org.apache.taglibs 5号包: org.codehaus.castor org.aspectj org.beanshell 6...

    spring-framework-3.0.5.RELEASE-dependencies-3

    org.apache.xerces org.apache.xml org.apache.xmlbeans org.apache.xmlcommons org.apache.derby org.apache.poi org.apache.struts org.apache.taglibs 5号包: org.codehaus.castor org.aspectj org.beanshell 6...

    spring-framework-3.0.5.RELEASE-dependencies-2

    org.apache.xerces org.apache.xml org.apache.xmlbeans org.apache.xmlcommons org.apache.derby org.apache.poi org.apache.struts org.apache.taglibs 5号包: org.codehaus.castor org.aspectj org.beanshell 6...

Global site tag (gtag.js) - Google Analytics