Problem with JDK 1.4/org.apache.xalan.serialize.SerializerFactory

Discussion in 'Java' started by Scott Harper, May 25, 2006.

  1. Scott Harper

    Scott Harper Guest

    Using 1.4 JVM, on a hosted server, so I don't have a real option to change
    VMs, and limited ability to debug/diagnose...

    I'm getting the following exception (error):

    java.lang.NoClassDefFoundError at
    java.lang.Class.forName()(Native Method) at
    java.lang.Class.forName(Class.java:141) at
    org.apache.xalan.serialize.SerializerFactory.getSerializer(SerializerFactory.
    java:131) at
    [...]

    So first of all, I'm assuming that the class it *really* can't find is the
    SerializerFactory, right?

    This is only happening when I make a call to
    javax.xml.transform.Transformer.transform(). I can use other methods of this
    class without hitting the error (primarily setOutputProperty).

    I'm guessing org.apache.xalan.serialize.SerializerFactory isn't part of the
    Sun distro, but apparently they are calling into it from their code. I found
    an old bug report in the Sun repository
    (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4965825)
    that says this isn't a bug, because:

    "The issue has to do with a bug in the Apache classes in JDK 1.4. The users is
    using these classes directly and not using these javax.xml package. Therefore,
    this really can not be considered a bug in the JDK."

    But that is not the case here, as I am using the java.xml package. This error
    occurs when I call Transformer.transform().

    Is there a workaround? Maybe a particular updated xalan jar file I can
    include with my webapp? Or something that the server owner can update? What
    about setting some property in the Transformer object that would point to a
    different serializer?


    Thanks,
    scott
     
    Scott Harper, May 25, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page