Description of problem: Version-Release number of selected component (if applicable): xalan-j2-2.7.0-4jpp_2fc How reproducible: every time 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 -XSL langfilter.xsl Actual results: (Location of error unknown)XSLT Error (java.lang.NoClassDefFoundError): org.apache.xalan.templates.ElemValueOf Exception in thread "main" java.lang.RuntimeException: org.apache.xalan.templates.ElemValueOf at org.apache.xalan.xslt.Process.doExit(Process.java:1153) at org.apache.xalan.xslt.Process.main(Process.java:1126) Expected results: 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 Additional info: This breaks the OpenOffice.org build
Created attachment 133000 [details] sample xsl
I'm not sure where exactly the real bug lies. org.apache.xalan.templates.ElemValueOf.execute() uses org.apache.xml.serializer.SerializationHandler: public void execute(TransformerImpl transformer) throws TransformerException { XPathContext xctxt = transformer.getXPathContext(); SerializationHandler rth = transformer.getResultTreeHandler(); but org.apache.xml.serializer.SerializationHandler is defined in xalan-j2-serializer.jar So I can run your command with java -classpath /usr/share/java/xalan-j2.jar:/usr/share/java/xalan-j2-serializer.jar 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: http://sipx-wiki.calivia.com/index.php/SipX_ConfigServer_Tips << 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 xalan-j2.jar has "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 that problem 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.