You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Vicek Chawla <vc...@comergent.com> on 2000/08/11 02:46:06 UTC

Using LotusXSL 0.20.0 with XML4j 1.1.16 and JDK 1.2.2

I am able to compile SimpleTransform.java but I get the following error.

java -cp .;C:\jdk1.2.2\lib\xml4j_1_1_16.jar;C:\jdk1.2.2\lib\xalan.jar SimpleTransform
n in thread "main" java.lang.NoClassDefFoundError: org/xml/sax/ext/LexicalHandler
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:442)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:101)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$1(URLClassLoader.java:216)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:191)
at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:275)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.apache.xalan.xslt.XSLTEngineImpl.<init>(XSLTEngineImpl.java:283)
at org.apache.xalan.xslt.XSLTProcessorFactory.getProcessor(XSLTProcessorFactory.java:79)
at SimpleTransform.main(SimpleTransform.java:77)


The version of XML4j (1.1.16) that I am using does not have the class it wants (org/xml/sax/ext/LexicalHandler)
I am not using Xerces.jar.
I could find that class in 3.0.1 version of XML4j. 

Can I change any code so that it doesn't use that particular class. Or can you people recommend me any other XSLT engine that would work with my configuration.?

I thank all of you for your help. I am attatching a sample code.

Vivek

Here is the code:
import org.xml.sax.SAXException;

import org.apache.xalan.xslt.XSLTProcessorFactory;

import org.apache.xalan.xslt.XSLTInputSource;

import org.apache.xalan.xslt.XSLTResultTarget;

import org.apache.xalan.xslt.XSLTProcessor;

/**

* Simple sample code to show how to run the XSL processor

* from the API.

*/

public class SimpleTransform

{

public static void main(String[] args)

throws java.io.IOException,

java.net.MalformedURLException,

org.xml.sax.SAXException

{

// Have the XSLTProcessorFactory obtain a interface to a

// new XSLTProcessor object.

XSLTProcessor processor = XSLTProcessorFactory.getProcessor();

// Have the XSLTProcessor processor object transform "foo.xml" to

// System.out, using the XSLT instructions found in "foo.xsl".

processor.process(new XSLTInputSource("foo.xml"),

new XSLTInputSource("foo.xsl"),

new XSLTResultTarget(System.out));

}

}