Xerces错误:org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl [英] Xerces error: org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl

查看:1003
本文介绍了Xerces错误:org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个使用JSF 2.0,NetBeans 6.9.1,GlassFish Server 3.1,mojarra 2.0.3和JasperReports 3.7.6的Web应用程序。包含在我的项目库中的是jar文件xerces-2.8.0.jar。这个文件是作为JasperReports jar文件库的一部分导入的。每当我尝试通过NetBeans部署,运行或调试项目时,都会收到此错误消息:

  java.lang.Exception: java.lang.IllegalStateException:ContainerBase.addChild:start:org.apache.catalina.LifecycleException:com.sun.faces.config.ConfigurationException:CONFIGURATION FAILED! DTD工厂类org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl不从DTDDVFactory扩展。 

在我的项目发生任何更改后,我的构建失败,并且我收到上述错误,当我尝试部署,运行或调试它。我必须重新启动服务器并再次运行/调试。我搜索了互联网,找不到解决这个问题的办法。我查看了这个jar文件,DTDDVFactoryImpl的确从DTDDVFactory扩展 - 我不知道为什么我会收到这个错误。虽然我最终可以让我的项目运行,但如果我没有收到此错误,它会更好。



任何人都可以告诉我我该如何解决这个问题?我是否需要从我的项目库中删除此文件?我需要用新版本/旧版本更新这个文件吗? 如果你提供自己的xerces.jar,你必须通过认可的标准覆盖机制( java -Djava.endorsed.dirs = / path / to / xerces.jar )来执行此操作,您不能只添加它在类路径上(如果你这样做,迟早会遇到麻烦)。让我解释一下。



JAXP是 Java API XML处理。 JAXP对象(如解析器,XSLT transfomers,DOM文档)的创建是通过工厂/工厂方法模式完成的,所以你可以插入一个新的JAXP实现(它必须比你的JRE提供的更新)。 Xerces提供了JAXP实现(的一部分)并且包含认可的标准(一个被认可的标准是一个Java API,它是通过Java社区过程以外的标准过程定义的,参见认可的标准覆盖机制)。如果您不使用ESOM,您将遇到各种麻烦。


I'm developing a web application using JSF 2.0, NetBeans 6.9.1, GlassFish Server 3.1, mojarra 2.0.3, and JasperReports 3.7.6. Included in my project library is the jar file "xerces-2.8.0.jar". This file was imported as part of the JasperReports jar file library. Whenever I try to deploy, run, or debug my project through NetBeans, I receive this error:

java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! DTD factory class org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory.

After any change in my project my build fails, and I receive the above error, when I try to deploy, run, or debug it. I have to restart the server and run/debug a second time. I've searched the internet and cannot find a solution to this problem. I've looked at the jar file in question, and and DTDDVFactoryImpl does indeed extend from DTDDVFactory - I don't know why I'm receiving this error. While I can eventually get my project running, it would be much nicer if I wasn't receiving this error.

Can anyone please tell me how I can fix this? Do I need to remove this file from my project library? Do I need to update this file with a newer version/older version?

解决方案

If you provide your own xerces.jar, you have to do that through the Endorsed Standards Override Mechanism (java -Djava.endorsed.dirs=/path/to/xerces.jar), you are not allowed to just add it on the classpath (and will sooner or later run into trouble if you do). Let me explain.

JAXP is the Java API for XML Processing. The creation of JAXP objects (like parsers, XSLT transfomers, DOM Documents) is done through the factory/factory-method pattern so you can plugin a new JAXP implementation (it has to be newer than the one provided in your JRE). Xerces provides (part of) a JAXP implementation and contains endorsed standards (an endorsed standard is a Java API defined through a standards process other than the Java Community Process, see the Endorsed Standards Override Mechanism). You'll run in all kinds of troubles if you don't use the ESOM.

这篇关于Xerces错误:org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆