【问题标题】:StAXSource not accepted by validator in JBoss EAP 6.1JBoss EAP 6.1 中的验证器不接受 StAXSource
【发布时间】:2013-12-27 21:42:19
【问题描述】:

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

我尝试了什么:
我尝试使用 StAX 一次进行解析和验证。
example 中所述。

我能够将程序作为独立应用程序执行,
但是当我在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-2046, activiti..等
我不确定,为什么 JBoss 不支持 StAXSource,有什么线索吗?

【问题讨论】:

    标签: jboss xml-parsing jboss6.x xml-validation stax


    【解决方案1】:

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

    解决方案: 添加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,但在 Xerces-J 2.10.0 中发布了 StaxSource 增强功能(更多详细信息请参阅JBoss EAP Component details)。
    Xerces-J 2.10.0 具有针对java.xml.validation 的实现增强功能并支持@ 987654332@ 用于 JAXP 验证器。


    更新:添加了 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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-28
      • 1970-01-01
      • 2020-10-08
      • 2013-08-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多