xsl-list
[Top] [All Lists]

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 ?

2015-03-04 12:03:50
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(_at_)uwindsor(_dot_)ca <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> 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(_at_)uwindsor(_dot_)ca
www.uwindsor.ca/its
 XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe <-list/528976> (by
email <>)

--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>