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

RE: Error when moving from Xalan to Saxon

Subject: RE: Error when moving from Xalan to Saxon
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 3 Nov 2004 16:15:34 -0000
system.setproperty javax.xml.transform.transformer
It looks as if you are trying to run Saxon under JDK 1.3, and it's failing
because the class java.lang.AssertionError isn't present in that
environment.

Saxon requires JDK 1.4.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: Bhupendra Singh [mailto:skbhupendra@xxxxxxxxxxx] 
> Sent: 03 November 2004 14:50
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Error when moving from Xalan to Saxon
> 
> 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","n
> et.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$(Extensi
onFunctionFactory.java:16)
> 	at
> net.sf.saxon.functions.ExtensionFunctionFactory.<init>(Extensi
> onFunctionFactory.java:16)
> 	at
> net.sf.saxon.Configuration.<init>(Configuration.java:62)
> 	at
> net.sf.saxon.TransformerFactoryImpl.<init>(TransformerFactoryI
> mpl.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

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-2013 All Rights Reserved.