Just a guess...
Where do you set the classpath, so that the java command can find the
org.apache.xalan.* classes? In other words, how are the classes found when
you run from the command line? (I suspect that you set a $CLASSPATH in
your shellrc (.cshrc, .bashrc, .login, etc), which IIRC is not sourced when
you run under cron.)
Try changing your cron script to just do a 'printenv' or 'set' or whatever
will dump all environment variables. Compare that output with the output
of the same 'printenv' or 'set' command from the command line (where
everything works), and I think the answer might jump out at you.
I suspect it will be as simple as adding a -classpath parameter to your
java invocation.
Again, just a guess. YMMV.
-blair
Blair Wyman -- iSeries JVM -- (507) 253-2891
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"It is a sobering thought that when Mozart was my age,
he had been dead for two years." -- Tom Lehrer
"Kairam, Raj"
<[EMAIL PROTECTED] To: "JDJList"
<[EMAIL PROTECTED]>
m> cc: "Kairam, Raj"
<[EMAIL PROTECTED]>
Subject: [jdjlist] problem running an
XSLT program as a cron
08/16/2002 01:35
PM
Please respond to
"JDJList"
To any of you on HP-UX 11 using the xalan-j_2_3_1 to do an xml to html
conversion ..
As root on HP-UX 11 box, I try to run a script as a cron job " 25 14 * *
0-6
/home/meta32/myxslt/run_prodstats.sh"
-rwxrwxrwx 1 root sys 280 Aug 14 17:11
/home/meta32/myxslt/run_prodstats.sh
The /var/mail/root contains the following error message indicating the
process failed to run.
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/xalan/xslt/Process
The shell script run_prodstats.sh contains just thes lines ..
#!/usr/bin/sh
cd /home/meta32/myxslt
/opt/java1.3/bin/java org.apache.xalan.xslt.Process -in
../myxsql/prodstats.xml -xsl StatsStyle.xsl -out
/usr/local/apache/htdocs/Metaphase/prodstats.html ( all on one line )
The same command on command line works correctly.
root@m020cad3:/home/meta32/myxslt>/opt/java1.3/bin/java
org.apache.xalan.xslt.Process -in ../myxsql/prodstats.xml -xsl
StatsStyle.xsl -out /usr/local/apache/htdocs/Metaphase/prodstats.html (
all
on one line )
I will appreciate if any one could help me with this situation
Thanks
Raj
To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm
To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm