nested exception is javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.Doc

原创 2013年12月04日 22:42:29

org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext.xml]; nested exception is javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
 at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
 at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
 at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
 at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
 at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
 at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
 at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
 at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
 at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
 at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
 at action.LoginAction.execute(LoginAction.java:10)
 at junit.test.SpringTest.test(SpringTest.java:15)
 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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
 at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
 at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
 at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
 at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
 at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
 at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
 at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
 at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
 at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
 at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
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:89)
 at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:70)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
 ... 39 more

解决方法 设置两个属性(javax.xml.parsers.DocumentBuilderFactory,javax.xml.parsers.SAXParserFactory)值如下: 
System.setProperty("javax.xml.parsers.DocumentBuilderFactory", 
       "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"); 
System.setProperty("javax.xml.parsers.SAXParserFactory", 
       "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"); 
再运行就没有错了.


 

版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is javax.xml.strea

Message: elementGetText() function expects text only elment but START_ELEMENT was encountered. Cause...

org.apache.xerces.parsers.XML11Configuration cannot be cast to org.apache.xe

Caught exception while loading file struts-default.xml - [unknown location]       at com.opensymphon...

org.apache.xerces.parsers.XML11Configuration cannot be cast to org.apache.xe

Caught exception while loading file struts-default.xml - [unknown location]       at com.opensympho...

javax.xml.parsers.FactoryConfigurationError错误分析

2008-10-2 15:34:36 org.springframework.context.support.AbstractApplicationContext prepareRefresh ...

javax.xml.parsers.FactoryConfigurationError错误分析

2008-10-2 15:34:36 org.springframework.context.support.AbstractApplicationContext prepareRefresh  信...

分析javax.xml.parsers.FactoryConfigurationError(给出异常分析)

声明:转载请注明出处,否则追究其法律责任 引发这个异常有很多原因这边列举两种: 1 .tomcat运行时抛出的异常 : 异常具体为 java.lang.reflect.InvocationTarget...

关于spring+springMVC+mybatis+maven搭建中的nested exception is org.apache.ibatis.binding.BindingException

以前没用maven的时候啥都很好,但是现在项目使用了maven,我也就把项目转换成了maven的方式。 项目中的mybatis使用的是mapper代理的方式进行开发,项目未迁移之前可以正常运行,但是...

Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid b

最近在使用Maven+SSM整合开发分模块分布式的时候,出现了以下的错误Request processing failed; nested exception is org.apache.ibatis...

nested exception is org.apache.ibatis.binding.BindingException: Invalid (not found)

这个错误情况有很多,就说最坑的一种:找不到mapper文件 错误信息 type Exception report message Request processing failed; neste...

nested exception is java.net.UnknownHostException: ibatis.apache.org

程序是使用ant打包的jar包服务,在windows上可正常运行,但是移植到linux上后,使用java -jar jar包名,运行这个jar包,会报下边的这些问题: Caused by: org....
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)