JBoss EAP 6.1中的验证程序不接受StAXSource [英] StAXSource not accepted by validator in JBoss EAP 6.1
问题描述
在JBoss Server中验证StAXSource
时出现的问题,
我尝试过的事情:
我尝试使用StAX一次进行解析和验证.
如本 示例 所述.
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.
我可以将程序作为独立的应用程序执行,
,但是当我在JBoss EAP 6.1
服务器中将其作为Web应用程序尝试使用时,出现以下异常.
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.
例外:
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 ,
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?
推荐答案
通过添加xercesImpl 2.11.0依赖性解决了问题. (如 forums_activiti 中所述)
解决方案:添加xerces 2.11.0
依赖项.
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>
详细信息:
JBoss EAP 6.1具有Xerces 2.9.1-redhat-4,但Xerces-J 2.10.0中发布了StaxSource增强功能(有关更多详细信息,请参考 JBoss EAP组件详细信息).
Xerces-J 2.10.0 具有java.xml.validation
的实现增强功能,并为JAXP验证程序支持StAXSource
.
更新:在JBoss EAP中添加了 功能请求 1.6 项目.
参考文献:
http://comments.gmane.org/gmane.comp.apache. commons.general/1770
http://xerces.apache.org/xerces2-j/
http://people.apache.org/~edwingo/jaxp-faq.html
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屋!