JBoss EAP 6.1 中的验证器不接受 StAXSource [英] StAXSource not accepted by validator in JBoss EAP 6.1

查看:18
本文介绍了JBoss EAP 6.1 中的验证器不接受 StAXSource的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

我的尝试:
我尝试使用 StAX 一次进行解析和验证.
如本 项目.

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

Issue while Validating StAXSource in JBoss Server,

What I Tried:
I try to do parsing and validation at a time using StAX.
As described in this example.

I am able to execute the program as standalone application,
but when I try it as a web application in JBoss EAP 6.1 server got below exception.

Exception:

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)

There are multiple frame works modified from StAXSource to StreamSource, TEIID-2046, activiti..etc.
I am not sure, Why JBoss is not supporting StAXSource, any clues?

解决方案

Issue got resolved by adding xercesImpl 2.11.0 dependency. (as mentioned in forums_activiti)

Solution: add xerces 2.11.0 dependency.

<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.


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

这篇关于JBoss EAP 6.1 中的验证器不接受 StAXSource的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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