[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Error when moving from Xalan to Saxon

Subject: Error when moving from Xalan to Saxon
From: Bhupendra Singh <skbhupendra@xxxxxxxxxxx>
Date: Wed, 3 Nov 2004 14:49:50 +0000 (GMT)
saxon transformerfactory
Hi,
I dont know if this is the correct forum to put the
quesiton, but maybe somebody can help me out.

I have a simple java class to transform a XML using a
XSL to a HTML. Here is the java code.

///////////////////
import java.io.*;

import javax.xml.transform.Transformer;
import
javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;

public class TransformerTest
{
	public static void main(String[] args)
    throws TransformerException,
TransformerConfigurationException,
           FileNotFoundException, IOException
  {
	String strXSLFile = "ToHTML.XSL";
	String xmlFileName = "MyXML.xml";


System.setProperty("javax.xml.transform.TransformerFactory","net.sf.saxon.TransformerFactoryImpl");
	System.out.println("JRE HOME                  =
"+System.getProperty("java.home"));
	System.out.println("JRE VERSION               =
"+System.getProperty("java.version"));


	TransformerFactory tFactory =
TransformerFactory.newInstance();

	Transformer transformer = tFactory.newTransformer(new
StreamSource(strXSLFile));

	System.out.println("TransformerFactory  class =
"+tFactory.getClass().getName());
	System.out.println("Transformer class         =
"+transformer.getClass().getName());

	transformer.transform(new StreamSource(xmlFileName),
new StreamResult(new FileOutputStream("tpc.out")));
  }
}
/////////////

I am running this java class in WSAD (IBM Websphere
Studio Aplication Developer). I have the saxon8.jar in
my classpath.
I get the gollowing error while running it.
/////////
JRE HOME                  = C:\Program
Files\IBM\WebSphere Studio\Application
Developer\v5.1\runtimes\base_v5\java\jre
JRE VERSION               = 1.3.1

java.lang.NoClassDefFoundError:
java/lang/AssertionError
	at java.lang.Class.forName1(Native Method)
	at java.lang.Class.forName(Class.java:142)
	at
net.sf.saxon.functions.ExtensionFunctionFactory.class$(ExtensionFunctionFactory.java:16)
	at
net.sf.saxon.functions.ExtensionFunctionFactory.<init>(ExtensionFunctionFactory.java:16)
	at
net.sf.saxon.Configuration.<init>(Configuration.java:62)
	at
net.sf.saxon.TransformerFactoryImpl.<init>(TransformerFactoryImpl.java:48)
	at java.lang.Class.newInstance0(Native Method)
	at java.lang.Class.newInstance(Class.java:262)
	at
javax.xml.transform.FactoryFinder.newInstance(Unknown
Source)
	at javax.xml.transform.FactoryFinder.find(Unknown
Source)
	at
javax.xml.transform.TransformerFactory.newInstance(Unknown
Source)
	at TransformerTest.main(TransformerTest.java:33)
Exception in thread "main" 
/////////

Has any body come acrosss this error. Any pointers
will be highly appreciated.
regards,
Bhupendra.


	
	
		
___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.