This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes XML and Related Technologies and the fly likes Problem with XSL on Solaris, works fine on NT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Problem with XSL on Solaris, works fine on NT" Watch "Problem with XSL on Solaris, works fine on NT" New topic
Author

Problem with XSL on Solaris, works fine on NT

Muthu Subramaniam
Greenhorn

Joined: Jun 29, 2001
Posts: 1
Hi,
I have a program that works fine on Windows NT which I want to deploy it on Solaris but facing problem when I try to acquire an instance of TransformerFactory. Here is the snippet of code I have problem with and the error message.
I use JDK1.2.2 and JAXP for the Transformation. I copied jaxp.jar, crimson.jar and xalan.jar into jdk1.2.2/jre/lib/ext directory to avoid specifing CLASSPATH. The program works fine on NT but throws error on Solaris.
Will appreciate any help on this.
import javax.xml.transform.*;
public class TestXSL {
public static void main(String[] args) {
System.out.println("Started");

TransformerFactory factory = TransformerFactory.newInstance();
System.out.println("Finished");
}
}

Here is the error
bash-2.03$ /usr/bin/Solaris_JDK_1.2.2_08/bin/java -cp .:/usr/bin/Solaris_JDK_1.2.2_08/jre/lib/ext/jaxp.jar:/usr/bin/Solaris_JDK_1.2.2_08/jre/lib/ext/xalan.jar:/usr/bin/Solaris_JDK_1.2.2_08/jre/lib/ext/crimson.jar TestXSL
Started
Exception in thread "main" javax.xml.transform.TFactoryConfigurationError: org.apache.xalan.processor.TransformerFactoryImpl
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.<init>(Throwable.java:82)
at java.lang.Error.<init>(Error.java:41)
at javax.xml.transform.TFactoryConfigurationError.<init>(TFactoryConfigurationError.java:64)
at javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:134)
at TestXSL.main(TestXSL.java:9)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Problem with XSL on Solaris, works fine on NT