#5 xalan and barode4j error.

closed
nobody
5
2006-01-03
2005-12-30
Anonymous
No

Hello,

I'd appreciate any suggestions as to what is causing
this error, I am using barcode4j as a Xalan extension:

file:///C:/Test%
20Environment/XSLT/Barcodes/barcodes.xsl; Line #16;
Column #87;XSLT Error
javax.xml.transform.TransformerException):
java.lang.NoSuchMethodException: For extension
function, could not find method
org.apache.xml.dtm.ref.DTM
NodeIterator.generate([ExpressionContext,] #STRING).

the stylesheet I am using is as follows:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"

xmlns:barcode="org.krysalis.barcode4j.xalan.BarcodeExt
"
extension-element-prefixes="barcode">

<xsl:template match="/">

<xsl:variable name="barcode-cfg">
<barcode>
<code128>
<height>8mm</height>
</code128>
</barcode>
</xsl:variable>
<xsl:variable name="barcod"
select="barcode:generate($barcode-
cfg, '0123456789')"/>
<xsl:copy-of select="$barcod"/>

</xsl:template>

</xsl:stylesheet>

thanks

Steve Cameron.

Discussion

  • Jeremias Märki

    Jeremias Märki - 2005-12-30

    Logged In: YES
    user_id=225352

    There is a lot of information missing to get a better grasp
    at your problem: JDK version, Xalan version (if the
    JDK-bundled one is replaced), a full stack trace of the
    exception. From the path names I assume you're on Windows.
    As far as I can see the exception is not a direct result of
    the Xalan extension for Barcode4J because the code doesn't
    call NoteIterator.generate() directly. My best guess is
    (without verifying it) is that you're using a JDK 5.0
    out-of-the-box. Sun changed the package names for Xalan for
    the version they packed into JDK 5. This might create an
    incompatibility with Barcode4J or any other extension
    written for Xalan-J for that matter. Assuming my guess is
    right, please replace the Xalan-J version with the latest
    official release by placing the JARs in the jre/lib/endorsed
    directory of your JDK 5 installation. For more information,
    please see http://barcode4j.krysalis.org/faq.html#endorsement

    Please let me know if this solved your problem and close
    this issue if it did. Otherwise, please try to give me some
    more information so I can reproduce your problem. Thanks!

    Jeremias Maerki

     
  • Nobody/Anonymous

    Logged In: NO

    Thanks for your assistance Jeremias,

    I have solved the problem. I had a simple error in my
    classpath so that I was not finding the correct jar files
    in the barcode4j release installation folders.

    Being new to Java programming I will need to read up on
    how to solve such issues better as I spent alot of time on
    it last week. Seems I was looking in the wrong place for
    errors!

    Thanks again.

    Steve Cameron

     
  • Jeremias Märki

    Jeremias Märki - 2006-01-03
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks