Unable to run shell script from Java thru Websphere

Joined
Feb 7, 2009
Messages
1
Reaction score
0
Hi,
I am struggling to run a shell script from Java thru websphere. The script is running well from the Shell prompt but throwing an error (Process killed-exit value 137) when running form Java.
With in the shell script I am setting the environment for an executable and making the executable run .
I am placing the script and also the JSP to run the script below:

<% try
{
String permString = "chmod 777 /home/wsphere/mobius/PWD_FILES/win_ABC1.sh";
Process p = Runtime.getRuntime().exec(permString);
p.waitFor();
Process process = Runtime.getRuntime().exec("/home/wsphere/mobius/PWD_FILES/win_ABC1.sh"); //I tried adding "bin/bash -c" before .sh file here
process.waitFor();
........
.....

Shell (ksh) script:

export ORACLE_HOME=/u01/app/oracle/product/10.2.0.1
export TNS_ADMIN=$ORACLE_HOME/network/admin
....
....
echo before executing VDR

/home/wsphere/mobius/VDRDBXML/bin/vdrdbxml -F /home/wsphere/mobius/PWD_FILES/WIN/WIN_ABC1.txt -DSN ISMX -U BML -P BML -DSU mob -DSP mob -X -LOG /home/wsphere/mobius/PWD_FILES/WIN/WIN_ABC1.log -nex
#end of file
....


All the environment was set correctly..Iam able to get the message "Before executing VDR", but while executing the executable I am receiving signal 9 from AIX.

The environment in jdk 1.4.2, websphere 6.1 Kshell and AIX 5.3. This shell script is running fine at command prompt.

The user is having all permissions & authorized to run the script.

Please advice...Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top