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

S

Scott Harper

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,807
Latest member
ryef

Latest Threads

Top