<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Oozie-- java: command not found - shell action in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Oozie-java-command-not-found-shell-action/m-p/149387#M111910</link>
    <description>&lt;P&gt;I am running a java program from a shell script through Oozie and I get the below error&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;java: command not found
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When I run the shell script from the edge node I do not find any issues and the java class runs without any error and I get the desired output also. However it is the oozie job that fails to run the java command.&lt;/P&gt;&lt;P&gt;All other actions in oozie are executed porperly but when it encounters the &lt;CODE&gt;java&lt;/CODE&gt; line, it throws the afore said error. I understand that all the nodes in the Hadoop cluster will have Java installed, then why do I get this error? Below is the java command that I have in my shell script&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;...
...    
java -cp $LOCAL_DIR/libs/integration-tools.jar com.audit.reporting.GenerateExcelReport $LOCAL_DIR/input.txt $LOCAL_DIR/
... &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Please provide your thoughts.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Mar 2017 21:52:22 GMT</pubDate>
    <dc:creator>Alexraj84</dc:creator>
    <dc:date>2017-03-09T21:52:22Z</dc:date>
    <item>
      <title>Oozie-- java: command not found - shell action</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-java-command-not-found-shell-action/m-p/149387#M111910</link>
      <description>&lt;P&gt;I am running a java program from a shell script through Oozie and I get the below error&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;java: command not found
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When I run the shell script from the edge node I do not find any issues and the java class runs without any error and I get the desired output also. However it is the oozie job that fails to run the java command.&lt;/P&gt;&lt;P&gt;All other actions in oozie are executed porperly but when it encounters the &lt;CODE&gt;java&lt;/CODE&gt; line, it throws the afore said error. I understand that all the nodes in the Hadoop cluster will have Java installed, then why do I get this error? Below is the java command that I have in my shell script&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;...
...    
java -cp $LOCAL_DIR/libs/integration-tools.jar com.audit.reporting.GenerateExcelReport $LOCAL_DIR/input.txt $LOCAL_DIR/
... &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Please provide your thoughts.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 21:52:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-java-command-not-found-shell-action/m-p/149387#M111910</guid>
      <dc:creator>Alexraj84</dc:creator>
      <dc:date>2017-03-09T21:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie-- java: command not found - shell action</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-java-command-not-found-shell-action/m-p/149388#M111911</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1505/alexraj84.html" nodeid="1505"&gt;@Alex Raj&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In your shell script try adding the following entries to tell where the JAVA is present as following:&lt;/P&gt;&lt;PRE&gt;export JAVA_HOME=/PATH/To/jdk1.8.0_67
$JAVA_HOME/bin/java -cp $LOCAL_DIR/libs/integration-tools.jar com.audit.reporting.GenerateExcelReport $LOCAL_DIR/input.txt $LOCAL_DIR/&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 22:28:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-java-command-not-found-shell-action/m-p/149388#M111911</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-03-09T22:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie-- java: command not found - shell action</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-java-command-not-found-shell-action/m-p/149389#M111912</link>
      <description>&lt;P&gt;I got the below error after those changes mentioned by you.&lt;/P&gt;&lt;PRE&gt;          &amp;lt;a href="http://10.241.1.164:8888/filebrowser/view=/opt/cloudera/parcels/CDH-5.5.2-1.cdh5.5.2.p0.4/lib/hadoop-hdfs/bin/hdfs%3A"&amp;gt;/opt/cloudera/parcels/CDH-5.5.2-1.cdh5.5.2.p0.4/bin/../lib/hadoop-hdfs/bin/hdfs:&amp;lt;/a&amp;gt; line 309: &amp;lt;a href="http://10.241.1.164:8888/filebrowser/view=/usr/java/jdk1.7.0_67/bin/java%3A"&amp;gt;/usr/java/jdk1.7.0_67/bin/java:&amp;lt;/a&amp;gt; No such file or directory
/opt/cloudera/parcels/CDH-5.5.2-1.cdh5.5.2.p0.4/bin/../lib/hadoop-hdfs/bin/hdfs: line 309: exec: &amp;lt;a href="http://10.241.1.164:8888/filebrowser/view=/usr/java/jdk1.7.0_67/bin/java%3A"&amp;gt;/usr/java/jdk1.7.0_67/bin/java:&amp;lt;/a&amp;gt; cannot execute: No such file or directory
./test.sh: line 30: &amp;lt;a href="http://10.241.1.164:8888/filebrowser/view=/usr/java/jdk1.7.0_67/bin/java%3A"&amp;gt;/usr/java/jdk1.7.0_67/bin/java:&amp;lt;/a&amp;gt; No such file or directory&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Mar 2017 22:52:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-java-command-not-found-shell-action/m-p/149389#M111912</guid>
      <dc:creator>Alexraj84</dc:creator>
      <dc:date>2017-03-09T22:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie-- java: command not found - shell action</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-java-command-not-found-shell-action/m-p/149390#M111913</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1505/alexraj84.html" nodeid="1505"&gt;@Alex Raj&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Looks like in your JAVA Path you have added some extra character  "%3A" which means ":" &lt;/P&gt;&lt;PRE&gt;/usr/java/jdk1.7.0_67/bin/java%3A&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Please check where it was added and then remove the extra ":"  from "&lt;/P&gt;&lt;PRE&gt;/usr/java/jdk1.7.0_67/bin/java:&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Mar 2017 23:22:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-java-command-not-found-shell-action/m-p/149390#M111913</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-03-09T23:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie-- java: command not found - shell action</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-java-command-not-found-shell-action/m-p/149391#M111914</link>
      <description>&lt;P&gt;That is carriage return from the log while copying the content.&lt;/P&gt;&lt;P&gt;I have created the JAVA_PATH accordingly.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 23:36:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-java-command-not-found-shell-action/m-p/149391#M111914</guid>
      <dc:creator>Alexraj84</dc:creator>
      <dc:date>2017-03-09T23:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie-- java: command not found - shell action</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-java-command-not-found-shell-action/m-p/149392#M111915</link>
      <description>&lt;P&gt;"Issue Fixed"&lt;/P&gt;&lt;P&gt;I talked with my DevOps later and found that the classpath for Java was not set in few datanodes in the Cluster. This was stopping the shell action to invoke the JVM at those datanodes. After fixing the Classpath, the job ran successfully&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2017 15:05:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-java-command-not-found-shell-action/m-p/149392#M111915</guid>
      <dc:creator>Alexraj84</dc:creator>
      <dc:date>2017-03-10T15:05:06Z</dc:date>
    </item>
  </channel>
</rss>

