Red Hat Bugzilla – Bug 200118
xalan-j2 -> XSLT Error (java.lang.NoClassDefFoundError): org.apache.xalan.templates.ElemValueOf
Last modified: 2007-11-30 17:11:38 EST
Description of problem:
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. take the attached langfilter.xsl and run
2. java -classpath /usr/share/java/xalan-j2.jar org.apache.xalan.xslt.Process
(Location of error unknown)XSLT Error (java.lang.NoClassDefFoundError):
Exception in thread "main" java.lang.RuntimeException:
You should get just
<?xml version="1.0" encoding="UTF-8?> on the output instead, which is what I
get with FC-5 xalan-j2-2.6.0-3jpp_9fc
This breaks the OpenOffice.org build
Created attachment 133000 [details]
I'm not sure where exactly the real bug lies.
public void execute(TransformerImpl transformer) throws TransformerException
XPathContext xctxt = transformer.getXPathContext();
SerializationHandler rth = transformer.getResultTreeHandler();
but org.apache.xml.serializer.SerializationHandler is defined in
So I can run your command with
org.apache.xalan.xslt.Process -XSL langfilter.xsl
The real mystery is why this didn't fail before. Is the split of
xalan-j2-serializer and xalan-j2 recent?
I've also seen tis problem cause problems with ant, where
jaxp_transform_impl.jar also referes to a class in xalan-j2-serializer.jar
I've found refs to this breaking Ant on the web, e.g:
For example after upgrading from xalan 2.6 to xalan 2.7 my Ant started
complaining about org/apache/xml/serializer/SerializerTrace class not being
found. Google search reveals that this class is now in new
xalan-j2-serializer.jar. To make ant load this jar you can do that following.
echo "xalan-j2-serializer.jar" > sipxconfig
sudo mv sipxconfig /etc/ant.d
yes, the split is new as of 2.7.0, but note that the META-INF/MANIFEST.MF of
"Class-Path: xercesImpl.jar xml-apis.jar serializer.jar"
so it looks like that xalan-j2-serializer.jar was intended to be called
serializer.jar and picked up through this mechanism. So perhaps fixing the
MANIFEST.MF to refer to the fedora names of these jars is the correct fix for
Actually as an aside, I did log a bug when 2.7.0 was initially released to
upgrade to it as early as possible in the rawhide cycle to flush out any
problems with the new separate serializer.jar early in the rawhide cycle :-)
Ah, well caught!
Okay, so we need to link xalan-j2-serializer.jar to serializer.jar, then? What
would be best?
From Vivek Lakshmanan:
xalan-j2-2.7.0-4jpp_4fc is now in dist-fc6-head. It contains a patch to replace
occurrences of serializer.jar in MANIFEST files to xalan-j2-serializer.jar.
xalan-j2-2.7.0-4jpp_4fc has been retagged into dist-fc6.