StAXSource not accepted by validator in JBoss EAP 6.1

ε祈祈猫儿з 提交于 2019-12-01 21:54:20

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/20493359/staxsource-not-accepted-by-validator-in-jboss-eap-6-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!