title: shell script in remote machine not working with ssh
body: <p>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 - </p>
  
  <pre><code>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
  </code></pre>
  
  <p>The script works locally, but when executed from a remote location the script throws the following exception - </p>
  
  <p>java.lang.ClassNotFoundException: No     ClassLoaders found for:     oracle.jdbc.xa.OracleXAException</p>
  
  <p>Thanks for your help.</p>