aspose file tools*
The moose likes XML and Related Technologies and the fly likes ZipException when trying to run Saxon on UNIX Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "ZipException when trying to run Saxon on UNIX" Watch "ZipException when trying to run Saxon on UNIX" New topic
Author

ZipException when trying to run Saxon on UNIX

Jill Smythe
Greenhorn

Joined: Jan 27, 2004
Posts: 11
Hi,
I am trying to run Saxon7.8 on an XML document (StreamAM.xml) with an XSL
stylesheet (StatusStream.xsl) in the following way:
/opt/java_1.4.1/bin/java -jar
/usr/dev/psoft/ps8common/saxon/saxon7.jar StatusAM.xml StatusStream.xsl
> StatusAM.htm
but keep getting the following ZipException:

I am working on UNIX with Weblogic6.1 web server and am really not sure why this is occurring -- it works fine when run on Windows...? Does anyone know Saxon or have any suggestions as to why this might be occurring? I'm pulling my hair out.
Thanks in advance,
Jill
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Try running
/opt/java_1.4.1/bin/jar -tf /usr/dev/psoft/ps8common/saxon/saxon7.jar
If it throws the same exception, the .jar file must be corrupted.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Jill Smythe
Greenhorn

Joined: Jan 27, 2004
Posts: 11
Hi Lasse,
Thanks for your reply. I tried executing as you suggested and got *slightly* different error:

Would you suggest that the jar file is corrupted? What is the -tf option?
Any suggestions will help!
Thanks again,
Jill
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Yes, the file is corrupted and you need to download it again from somewhere.
The "t" option tells jar to display the contents of a .jar file, and the "f" options tells jar that the following argument is the .jar file itself
Jill Smythe
Greenhorn

Joined: Jan 27, 2004
Posts: 11
Hi Lasse,
Thanks a lot for your help -- As you suggested, the jar file was corrupted and the problem was fixed by re-intalling it.

Thanks again!
Julie
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ZipException when trying to run Saxon on UNIX