Custom translator that depends on Xalan
mdfspiff Sep 22, 2014 4:34 PMTeiid 8.9.0
I'm developing a custom Teiid translator that depends on geo-tools. A particular module in geo-tools requires xalan for XSLT processing and unfortunately, does not work with saxon.
I've created a JBoss module for geo-tools described by module.xml below. My translator depends on this module (org.geotools). The problem is that saxon always seems to be loaded first regardless of how I configure the geo-tools module or the Jboss deployment structure file for the translator. It has something to do with the fact that the main teiid module includes Saxon-HE-9.5.1-6.jar.
module.xml
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="org.geotools">
<resources>
<resource-root path="gt-wfs-ng-13-SNAPSHOT.jar"/>
<resource-root path="gt-api-13-SNAPSHOT.jar"/>
...
<resource-root path="gt-xsd-wfs-13-SNAPSHOT.jar"/>
</resources>
<dependencies>
<module name="org.jboss.teiid">
<imports>
<exclude-set>
<path name="net.sf.saxon"/>
</exclude-set>
</imports>
</module>
<module name="org.apache.xalan"/>
<module name="org.apache.xerces"/>
<module name="javax.api"/>
</dependencies>
</module>
jboss-deployment-structure.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
<deployment>
<dependencies>
<module name="org.jboss.teiid">
<imports>
<exclude-set>
<path name="net.sf.saxon"/>
</exclude-set>
</imports>
</module>
<module name="javax.api"/>
<module name="org.apache.xerces" services="import"/>
<module name="org.apache.xalan" services="import"/>
<module name="org.geotools"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
Regardless of how these files are configured, the JBoss classloader loads saxon instead of xalan. Any idea what I'm doing wrong?