Project

Profile

Help

Error with transform.exe

Added by Anonymous over 14 years ago

Legacy ID: #7997305 Legacy Poster: Pooja (psha85)

Hi- I am having trouble using the Transform program with my XML files. I need it to output an html file and it's not working; it just gives an error every time. This is the script from the command prompt: Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\Admin>set path=%path%;C:\program files\saxon\bin C:\Documents and Settings\Admin>cd desktop C:\Documents and Settings\Admin\Desktop>dir Volume in drive C has no label. Volume Serial Number is BCF6-B5F1 Directory of C:\Documents and Settings\Admin\Desktop 01/11/2010 01:17 PM

. 01/11/2010 01:17 PM .. 10/05/2009 12:23 PM 8,711,691 01 - Hadippa - Mika Singh.mp3 10/05/2009 12:27 PM 9,993,497 02 - Discowale Khisko - K K, Sunidhi Chau han, Rana M.mp3 10/05/2009 12:31 PM 11,220,884 03 - Ishq Hi Rab Hai - Sonu Niigaam, Shre ya Ghoshal.mp3 10/05/2009 12:31 PM 4,570,271 04 - Bhangra Bistar - Alisha Chinoy, Suni dhi Chauhan & Hard Kaur @ Fmw11.com.mp3 01/06/2010 10:00 PM 7,923,697 04 - Iktara - Kavita Seth, Amitabh Bhatta charya.mp3 10/05/2009 12:32 PM 3,158,742 05 - Gym Shim - Joshilay @ Fmw11.com.mp3 01/04/2010 12:18 PM 3 Idiots - PDVDRip - XviD - 1CDRip - [DDR ] 01/05/2010 01:02 PM 229,040 5791710_Lynch_WEB305-08A_Dec_Assignment2. zip 01/04/2010 12:56 PM Adobe CS4 01/03/2010 07:14 PM 28,160 assignment.doc 09/03/2009 01:07 PM 56,832 CarolynLynchResume.doc 12/09/2009 05:20 PM 531 direction.xsd 01/01/2009 08:36 AM 776 Driver Genius Professional Edition.lnk 01/10/2010 11:07 PM 143,715 error.jpg 12/05/2009 05:01 PM Exercise2 10/05/2009 06:28 PM 1,734 HijackThis.lnk 12/28/2009 02:26 PM 132,583 Images.zip 12/26/2008 08:21 AM 689 IrfanView.lnk 12/14/2009 08:10 PM 304 measurements.dtd 12/09/2009 02:13 PM 248 measurements.xml 01/08/2010 03:37 PM 5,611 measurements.zip 01/08/2010 02:57 PM 430 measurements1.xml 12/09/2009 05:06 PM 1,126 measurements1.xsd 01/11/2010 01:21 PM 1,125 measurements1.xslt 10/20/2009 05:23 PM MP3s 01/11/2004 09:49 PM 339 My Documents.lnk 10/24/2009 12:56 PM 39 my money.txt 01/04/2010 03:20 PM 3,143 my-planets.txt 01/08/2010 02:48 PM 25,088 networking.doc 10/25/2009 08:02 PM 278 quote.txt 09/25/2009 05:10 PM 764 rahukalam.rtf 07/24/2009 08:54 PM 13,938,744 Songbird_1.3.0b1-1190_windows-i686-msvc8. exe 10/02/2009 11:23 AM 648 Style Studio.lnk 07/19/2009 01:49 PM 10,216,240 VeohVideoCompassSetup_eng.exe 01/05/2010 12:55 PM website 30 File(s) 70,366,969 bytes 7 Dir(s) 2,238,251,008 bytes free C:\Documents and Settings\Admin\Desktop>transform.exe -sa -s:measurements1.xml - xsl:measurements1.xslt -xsd:measurements1.xsd -o:measurements1.html java.lang.RuntimeException: java.lang.ClassNotFoundException: com.saxonica.valid ate.SchemaAwareConfiguration, saxon9sa, Version=9.1.0.8, Culture=neutral, Public KeyToken=e1fdd002d5083fe6 at net.sf.saxon.Configuration.makeSchemaAwareConfiguration(Configuration .java:370) at net.sf.saxon.Transform.setFactoryConfiguration(Transform.java:79) at cli.Saxon.Cmd.DotNetTransform.setFactoryConfiguration(Unknown Source) at net.sf.saxon.Transform.doTransform(Transform.java:133) at cli.Saxon.Cmd.DotNetTransform.Main(Unknown Source) Caused by: java.lang.ClassNotFoundException: com.saxonica.validate.SchemaAwareCo nfiguration, saxon9sa, Version=9.1.0.8, Culture=neutral, PublicKeyToken=e1fdd002 d5083fe6 at IKVM.NativeCode.java.lang.Class.forName0(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:187) at net.sf.saxon.Configuration.makeSchemaAwareConfiguration(Configuration .java:363) ... 4 more java.lang.ClassNotFoundException: com.saxonica.validate.SchemaAwareConfiguration , saxon9sa, Version=9.1.0.8, Culture=neutral, PublicKeyToken=e1fdd002d5083fe6 C:\Documents and Settings\Admin\Desktop> Can anyone make some suggestions about how I would be able to get this program to output an html file and fix this error? Please let me know ASAP. Thanks!! Pooja

Replies (10)

Please register to reply

RE: Error with transform.exe - Added by Anonymous over 14 years ago

Legacy ID: #7997327 Legacy Poster: Michael Kay (mhkay)

In Saxon 9.1 on .NET, the Saxon-SA code (specifically the SchemaAwareConfiguration class mentioned in the error message) is loaded dynamically from a separate DLL (saxon9sa.dll). I find that the only reliable way to make this work is to ensure that this DLL is in the Global Assembly Cache. Once it is, I've rarely had any problems. (Though there are a million and one ways that dynamic loading can fail under .NET once you start building complex security environments.)

RE: Error with transform.exe - Added by Anonymous over 14 years ago

Legacy ID: #7997349 Legacy Poster: Pooja (psha85)

Oh okay.. and how would I add it to the Global Assembly Cache? I've never even heard of that actually... lol. Thanks for your help!

RE: Error with transform.exe - Added by Anonymous over 14 years ago

Legacy ID: #7998040 Legacy Poster: Michael Kay (mhkay)

Go to Control Panel > Administrative Tools > Microsoft .NET Configuration > Manage the Assembly Cache > Add an Assembly. Then select the relevant assemblies. It's simplest to add ALL the assemblies (.dll files) issued with the Saxon product, that is, both the Saxon assemblies and the IKVM / Classpath assemblies.

RE: Error with transform.exe - Added by Anonymous over 14 years ago

Legacy ID: #7999726 Legacy Poster: Pooja (psha85)

Okay, I did what you said about the assembly cache and then tried the Transform tool again, but got the same result. Is it necessary to restart the computer or something before trying it again? Or should it have worked without that?

RE: Error with transform.exe - Added by Anonymous over 14 years ago

Legacy ID: #7999854 Legacy Poster: Michael Kay (mhkay)

No, I've never had to reboot to make this work. Can you list the contents of the GAC (from the same Configuration tool) to check that saxon9sa.dll is in there with matching version number (9.1.0.8) and PublicKeyToken? I'm afraid it's very frustrating when these things don't work, and very hard to debug remotely.

RE: Error with transform.exe - Added by Anonymous over 14 years ago

Legacy ID: #7999948 Legacy Poster: Pooja (psha85)

I see two: saxon9 and saxon9api. I'm assuming saxon9 is the one you mentioned...? And yes they have the same version number and public key token. Indeed, it is very frustrating!

RE: Error with transform.exe - Added by Anonymous over 14 years ago

Legacy ID: #8000651 Legacy Poster: Michael Kay (mhkay)

The class it's trying to load, SchemaAwareConfiguration, is in saxon9sa.dll - this should be in the GAC along with saxon9.dll and saxon9api.dll. It's occurred to me that you might not be using Saxon-SA at all. If that's the case, don't use the -sa option on the command line. Apologies if that's the solution and it didn't occur to me earlier.

RE: Error with transform.exe - Added by Anonymous over 14 years ago

Legacy ID: #8001945 Legacy Poster: Pooja (psha85)

I tried not typing the -sa option in the command line but I got another error. And I don't see the saxon9sa.dll file anywhere. I did a search on my computer but it didn't find it either. I tried installing the Enterprise Edition of Saxon and added those assemblies to the cache (but none of which included saxon9sa.dll). I again tried it with the -sa option and without but then I got an error about a licensing file not being found... I ordered an evaluation copy of Saxon EE but have not received the licensing key yet. I will try it after I receive that and see if it works...

RE: Error with transform.exe - Added by Anonymous over 14 years ago

Legacy ID: #8002205 Legacy Poster: Michael Kay (mhkay)

OK, so the original problem was that you were using Saxon-B 9.1, you used the -sa option and it didn't work because that option attempts to load Saxon-SA 9.1. So now you have installed Saxon-EE 9.2, which is the successor to Saxon-SA 9.1. This product needs a license file which you have now applied for and which hopefully has now been delivered to you.

RE: Error with transform.exe - Added by Anonymous over 14 years ago

Legacy ID: #8002235 Legacy Poster: Pooja (psha85)

Okay, I got the program to work now. Looks like downloading the EE version and the license fixed the problem. Thanks for your help! =)

    (1-10/10)

    Please register to reply