[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Update: Saxon java call works in my script but get an error when trying to submit same script from a cron job - how do I fix this error ?


Subject: Re: [xsl] Update: Saxon java call works in my script but get an error when trying to submit same script from a cron job - how do I fix this error ?
From: "Wolfgang Laun wolfgang.laun@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 4 Mar 2015 18:03:35 -0000

You are confusing Java's class path and the path for locating executable
files. cron jobs do not change a "Java class path" which must be properly
set anyway.
-W

On 4 March 2015 at 18:55, Catherine Wilbur cwilbur@xxxxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> We fixed the problem.  Had to change the command within the script to the
> following.
>
> *Old Saxon call within script logic*
>
>     java -cp $SAXON_JAR net.sf.saxon.Transform
> -s:$FinesrvDataDir/Library_Invoice_Interface.xml
> -xsl:$FinesrvCronDir/LibrXML2CSV_stylesheet.xsl
> -o:$FinesrvDataDir/Library_Invoice_Interface.csv
>
> *1)  New Saxon call within script logic*
> /usr/java5/bin/java -cp $SAXON_JAR net.sf.saxon.Transform
> -s:$FinesrvDataDir/Library_Invoice_Interface.xml
> -xsl:$FinesrvCronDir/LibrXML2CSV_stylesheet.xsl
> -o:$FinesrvDataDir/Library_Invoice_Interface.csv
>
> 2)  *We also had to change the shell* from "sh" to "ksh"
>
> For some reason the Systems group indicated that the cron job was
> overriding the java class path so in the script itself we had to change it
> to the above line of code so it is executing the proper java and it now
> works.  Because the class path has all kinds of other paths Systems did not
> want to try and figure out what the problem was.  They wanted to make sure
> I was using the Java I needed so this is how we corrected it.
>
> _____________________________________________________________________
> Catherine Wilbur  |  Senior Application Programmer  |  IT Services
> 401 Sunset Avenue, Windsor ON Canada  N9B 3P4
> (T) 519.253.3000 Ext. 2745  |  (F) 519.973.7083  |  (E)
> cwilbur@xxxxxxxxxxx
> www.uwindsor.ca/its
>  XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <-list/528976> (by
> email <>)