garry_m
asked on
Cron Throws "Exception in thread "main" java.util.zip.ZipException: No such file or directory"
Hi,
I have scheduled a cron job to run at 8:00 o'clock every night without fail. Here is the crontab:
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (legacy.cron installed on Fri Nov 26 09:15:21 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
00 20 * * * /opt/myApp/runApplication. sh
When the application is run directly (not through Cron) it works fine. Its just a shell script that loads up a java application:
((/opt/myApp/runApplicatio n.sh))
#!/bin/bash
/opt/java/j2sdk/bin/java -Xbootclasspath/a:"/opt/my App/resour ce.jar" -jar lib/myJar.jar -config myConfig.conf 2>&1 | tee /opt/myApp/logfile.log
However, when run through Cron, I receive the following error in the log file:
Exception in thread "main" java.util.zip.ZipException : No such file or directory
at java.util.zip.ZipFile.open (Native Method)
at java.util.zip.ZipFile.<ini t>(ZipFile .java:112)
at java.util.jar.JarFile.<ini t>(JarFile .java:117)
at java.util.jar.JarFile.<ini t>(JarFile .java:55)
This is only when the app is run through Cron. As far as I am aware, the application doesn't call any zip functions, but I am quite new to Java and I could be wrong.
Any help would be brilliant, thanks!
I have scheduled a cron job to run at 8:00 o'clock every night without fail. Here is the crontab:
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (legacy.cron installed on Fri Nov 26 09:15:21 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
00 20 * * * /opt/myApp/runApplication.
When the application is run directly (not through Cron) it works fine. Its just a shell script that loads up a java application:
((/opt/myApp/runApplicatio
#!/bin/bash
/opt/java/j2sdk/bin/java -Xbootclasspath/a:"/opt/my
However, when run through Cron, I receive the following error in the log file:
Exception in thread "main" java.util.zip.ZipException
at java.util.zip.ZipFile.open
at java.util.zip.ZipFile.<ini
at java.util.jar.JarFile.<ini
at java.util.jar.JarFile.<ini
This is only when the app is run through Cron. As far as I am aware, the application doesn't call any zip functions, but I am quite new to Java and I could be wrong.
Any help would be brilliant, thanks!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER