2013-12-10 91 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

相關問題