2013-12-10 95 views
3

问题,而在JBoss服务器验证StAXSource通过验证接受的,

我的尝试:
我尝试使用StAX的时间做分析和验证。
如此example中所述。StAXSource不是在JBoss的EAP 6.1

我能够作为独立应用程序
执行程序,但是当我在JBoss EAP 6.1服务器中尝试它作为web应用程序时,服务器得到了以下异常。

例外:

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-2046activiti ..等。
我不确定,为什么JBoss不支持StAXSource,有什么线索?

回答

3

问题通过添加xercesImpl 2.11.0依赖项得到解决。 (如forums_activiti中所述)

解决方案: add xerces 2.11.0依赖关系。

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

详情:
的JBoss EAP 6.1具有的Xerces 2.9.1-的redhat-4,但StaxSource增强Xerces-J中2.10.0发布(更多详情,请参阅JBoss EAP Component details)。
Xerces-J 2.10.0java.xml.validation具有实现增强功能,对JAXP验证程序支持StAXSource
enter image description here

更新:新增Feature Request in 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

相关问题