JBoss EAP 6.1 中的验证器不接受 StAXSource

2023-12-07

验证时出现问题StAXSource在 JBoss 服务器中,

我尝试过的:
我尝试使用 StAX 同时进行解析和验证。
如本文所述example.

我能够将程序作为独立应用程序执行,
但是当我尝试将它作为网络应用程序时JBoss EAP 6.1服务器出现以下异常。

例外:

java.lang.IllegalArgumentException: Source parameter of type      
javax.xml.transform.stax.StAXSource' is not accepted by this validator.
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)

有多个框架作品从StAXSource修改为StreamSource,TEIID-2046, activiti..etc.
我不确定,为什么 JBoss 不支持 StAXSource,有什么线索吗?


通过添加 xercesImpl 2.11.0 依赖项解决了问题。 (如中提到的论坛_活动)

解决方案: add xerces 2.11.0依赖性。

<dependency>         
   <groupId>xerces</groupId>         
   <artifactId>xercesImpl</artifactId>
   <version>2.11.0</version>
</dependency>

Details:
JBoss EAP 6.1 has Xerces 2.9.1-redhat-4, but StaxSource enhancement released in Xerces-J 2.10.0 (For more details refer JBoss EAP Component details).
Xerces-J 2.10.0 has implementation enhancement for java.xml.validation and supporting StAXSource for JAXP validator.
enter image description here

Update: Added Feature Request in JBoss EAP 1.6 project.

References:
http://comments.gmane.org/gmane.comp.apache.commons.general/1770
http://xerces.apache.org/xerces2-j/
http://people.apache.org/~edwingo/jaxp-faq.html

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

JBoss EAP 6.1 中的验证器不接受 StAXSource 的相关文章

随机推荐