jboss 7.1 xalan issue?

寵の児 提交于 2019-12-06 13:08:58
landal79

JBoss 7 or JBoss EAP 6 ships with its own xalan version, that you can find among its modules, in jboss eap 6.1:

<JBoss Home>/modules/system/layers/base/org/apache/xalan/main

if you want to use your own first you have to exclude jboss xalan with the below jboss deployment descriptor in /WEB-INF/jboss-deployment-structure.xml for war and /META-INF/jboss-deployment-structure.xml for ear:

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
    <deployment>            
        <exclusions>            
            <module name="org.apache.xalan" />
            <module name="org.apache.xerces" /> 
        </exclusions>
    </deployment>
</jboss-deployment-structure>

I excluded also Xerces, because usually they are bundled toghether.

Problem in the CBU (Carbon Based Unit) I was playing with xalan when I should have been playing with xerces. It is xerces 2.11 (DOH)

The easiest is to maybe deploy your application with /WEB-INF/jboss-deployment-structure.xml and explicitly exclude JBoss-provided libraries that you want to override, and then just package them yourself in the application, e.g. /WEB-INF/lib/xalan-2.11.0.jar

Here's an example of jboss-deployment-structure.xml:

<jboss-deployment-structure>
    <deployment>
        <dependencies>
            <module name="org.apache.xalan" />
            <module name="SOME.OTHER.MODULE.YOU.DONT.WANT.JBOSS.TO.PROVIDE" />
        </dependencies>
    </deployment>
</jboss-deployment-structure>

I have not tested this, though. Try it if it works and report. We'll try another approach if that doesn't work.

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