java学习bug总结
2014-01-12 16:39
330 查看
错误1: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)
解 决方法:
设置两个属性 (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");
原因:是使用MyEclipse创建项目时引用了 J2EE 1.4 Library Container库(JAVA构建路径-->库)
错误二:java.lang.reflect.InvocationTargetException
原因:jdk版本问题,配置出错,还有可能是缺少jar文件的原因。我出现过那次问题是因为配置出错了。
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)
解 决方法:
设置两个属性 (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");
原因:是使用MyEclipse创建项目时引用了 J2EE 1.4 Library Container库(JAVA构建路径-->库)
错误二:java.lang.reflect.InvocationTargetException
原因:jdk版本问题,配置出错,还有可能是缺少jar文件的原因。我出现过那次问题是因为配置出错了。
相关文章推荐
- Java基础学习总结(81)——如何尽可能的减少Java代码中bug
- Java基础学习总结(81)——如何尽可能的减少Java代码中bug
- Java IO流学习总结二:File
- 《Thinking in java 3th》第一次学习总结
- Java显式锁学习总结之四:ReentrantLock源码分析
- Java四种线程池的学习与总结
- Java基础学习总结(28)——Java对各种排序算法的实现
- Java学习总结(8)—内存流,打印流,对象流,RandomAccessFile,装饰者设计模式
- Java多线程学习总结
- 关于Java IO流学习总结
- java三大框架学习总结(1)
- Java线程学习和总结
- Java基础学习总结(116)——Map使用相关问题总结
- java web 学习笔记 编码问题总结
- Java - 设计模式学习总结
- 【黑马程序员】javaIO学习和总结
- 黑马程序员_java IO技术学习总结
- java数组 学习总结
- Java基础学习总结(65)——Java中的String,StringBuilder和StringBuffer比较
- Java学习笔记(89)-----------Java习惯用法总结