Page 1 of 1

Loader Constraints Violated when Linking org/w3c/dom/Node

Posted: Wed Jan 17, 2007 4:13 am
by rknovak
:?: During the execution of an XSLT transformation I'm receiving the following error message:

java.lang.LinkageError: loader constraints violated when linking org/w3c/dom/Node class

I'm running Oxygen XML Editor 8 Enterprise Edition on a Mac G4 laptop running Tiger OSX 10.4.8. I tried setting the same transformation up in Eclipse using the Oxygen plug-in and it works fine. The XSL script is failing during the execution of CreatePlot as shown below. The CreatePlot method utilizes the following jar files to generate several XML files and tif image files:

castor-0.9.9.jar
xerces.jar
commons-logging.jar
jcommon-1.0.0-rc1.jar
jai_imageio.jar

Thanks,
RN

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:s="xalan://java.lang.String"
xmlns:apm="xalan://cms.autoplot.AutoPlotManager"
xmlns:pr="xalan://cms.autoplot.PlotResult"
exclude-result-prefixes="s apm">
<xsl:param name="currentFileURL"/>
<xsl:output method="text"/>
<xsl:template match="calibJob">
<xsl:variable name="calibJobFilePath"
select="s:substring($currentFileURL, 5)"/>
<xsl:variable name="autoPlotManager"
select="apm:new()"/>
<xsl:variable name="plotResult"
select="apm:createCalibJobPlot($autoPlotManager, $calibJobFilePath)"/>

************** THIS IS WHERE IT IS FAILING **************
<xsl:variable name="voidResult"
select="pr:createPlot($plotResult)"/>

********************************************************************

<xsl:value-of select="pr:toString($plotResult)"/>
</xsl:template>
</xsl:stylesheet>

Posted: Wed Jan 17, 2007 12:02 pm
by sorin_ristache
Hello,

Probably your xerces.jar or your castor.jar was not compiled against the org.w3c.dom.Node class included in xml-apis.jar that comes with oXygen 8.0. Remove xerces.jar from your list of transformation extensions and try again to allow the transformation to use the Xerces version that comes with oXygen. If you get the same error then you have to use a castor.jar version compiled against the xml-apis.jar included in the Xerces 2.8.1 distribution from Apache. Other option is to add the xml-apis.jar that was used to compile your castor.jar to the list of the extension jars.


Regards,
Sorin