I am trying to execute a script located in machine B from machine A. PS - The script is trying to restart ATG instance on a JBOSS server. I tried following commands -
ssh user@hostname /path/to/script/remotescript.sh arg1 arg2
ssh user@hostname "bash -c '/path/to/script/remotescript.sh arg1 arg2'"
ssh user@hostname exec /path/to/script/remotescript.sh arg1 arg2
The script works locally, but when executed from a remote location the script throws the following exception -
java.lang.ClassNotFoundException: No ClassLoaders found for: oracle.jdbc.xa.OracleXAException
Thanks for your help.