Hi All,
I have script where i will startmy
java application through jar file. when i run the script from the console manually the application is starting properly with out any issues. Upto here every thing is fine , then problem is coming when i am running the script from the cronjob. see the error log below.
And my script contents go like this
#!/bin/bash
#set -x
umask 002
BASE_DIR=/site/dev-dms1
LIB=/site/dev-dms1/lib
DIST=/site/dev-dms1/dist
INSTANCE=Dev
WEBHOST=dev-dms1.enterprisenet.org
unset CLASSPATH
CLASSPATH="/site/dev-dms1/dist/rtv.jar"
unset JAVA_HOME
JAVA_HOME=/iapp/jdk/jre
for x in `find $LIB -maxdepth 1 -name "*.jar" | sort`
do
CLASSPATH=$CLASSPATH:$x
done
JAVA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1212 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
/iapp/jdk/jre/bin/java -server -Xms512m -Xmx512m -XX:NewRatio=2 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -classpath ${CLASSPATH} $JAVA_OPTS -Dapp.instance=$INSTANCE -Dapp.host=$WEBHOST -Djava.rmi.server.codebase=file://site/dev-dms1/dist/rtv.jar -Djava.rmi.server.hostname=dev-dms1.enterprisenet.org com.powerdigm.server.ServerApplication > $BASE_DIR/logs/dev_dms.out 2> $BASE_DIR/logs/dev_dms.err &
echo $! > $BASE_DIR/process.pid
umask 022