<?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 java.lang.ClassNotFoundException: org.apache.nifi.bootstrap.RunNiFi Error in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/java-lang-ClassNotFoundException-org-apache-nifi-bootstrap/m-p/387963#M246504</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Anyone Unlucky enough to run into this problem (at least as it happens on version M2.0.0-M2) when you try to run run-nifi.bat file to start nifi to be welcomed with this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; Could not find or load main class org.apache.nifi.bootstrap.RunNiFi&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At this point the nifi-app.log file has not been created so you are out of luck in determining what caused this error.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Solution:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I'm not saying this is the only reason you could encounter this error. After spending some time researching this error , Idid not find the exact match of this error message but I found something close (Example: &lt;A href="https://community.cloudera.com/t5/Support-Questions/Error-Error-Could-not-find-or-load-main-class-org-apache/td-p/141006" target="_blank" rel="noopener"&gt;https://community.cloudera.com/t5/Support-Questions/Error-Error-Could-not-find-or-load-main-class-org-apache/td-p/141006&lt;/A&gt; )&lt;/P&gt;&lt;P&gt;In my case you need to watch for the full error message which is :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;'F:\NIFI' is not recognized as an internal or external command,
operable program or batch file.
The JAVA_HOME environment variable is not defined correctly.
Instead the PATH will be used to find the java executable.

Error: Could not find or load main class org.apache.nifi.bootstrap.RunNiFi
Caused by: java.lang.ClassNotFoundException: org.apache.nifi.bootstrap.RunNiFi
Press any key to continue . . .&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Noticed the first line where it says 'F:\NIFI' is not recognized as an internal or external command..." . This is my installation path for Nifi and it turns out the full path is "NIFI 2.0.0M2" with white space between NIIF and the version and that is basically the problem. &lt;STRONG&gt;Once I removed the whitespace from the folder name it worked at least to where I can see the log file and continue from there.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Hope that will help someone out there running into the same situation.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 May 2024 02:40:39 GMT</pubDate>
    <dc:creator>SAMSAL</dc:creator>
    <dc:date>2024-05-17T02:40:39Z</dc:date>
    <item>
      <title>java.lang.ClassNotFoundException: org.apache.nifi.bootstrap.RunNiFi Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/java-lang-ClassNotFoundException-org-apache-nifi-bootstrap/m-p/387963#M246504</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Anyone Unlucky enough to run into this problem (at least as it happens on version M2.0.0-M2) when you try to run run-nifi.bat file to start nifi to be welcomed with this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; Could not find or load main class org.apache.nifi.bootstrap.RunNiFi&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At this point the nifi-app.log file has not been created so you are out of luck in determining what caused this error.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Solution:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I'm not saying this is the only reason you could encounter this error. After spending some time researching this error , Idid not find the exact match of this error message but I found something close (Example: &lt;A href="https://community.cloudera.com/t5/Support-Questions/Error-Error-Could-not-find-or-load-main-class-org-apache/td-p/141006" target="_blank" rel="noopener"&gt;https://community.cloudera.com/t5/Support-Questions/Error-Error-Could-not-find-or-load-main-class-org-apache/td-p/141006&lt;/A&gt; )&lt;/P&gt;&lt;P&gt;In my case you need to watch for the full error message which is :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;'F:\NIFI' is not recognized as an internal or external command,
operable program or batch file.
The JAVA_HOME environment variable is not defined correctly.
Instead the PATH will be used to find the java executable.

Error: Could not find or load main class org.apache.nifi.bootstrap.RunNiFi
Caused by: java.lang.ClassNotFoundException: org.apache.nifi.bootstrap.RunNiFi
Press any key to continue . . .&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Noticed the first line where it says 'F:\NIFI' is not recognized as an internal or external command..." . This is my installation path for Nifi and it turns out the full path is "NIFI 2.0.0M2" with white space between NIIF and the version and that is basically the problem. &lt;STRONG&gt;Once I removed the whitespace from the folder name it worked at least to where I can see the log file and continue from there.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Hope that will help someone out there running into the same situation.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 02:40:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/java-lang-ClassNotFoundException-org-apache-nifi-bootstrap/m-p/387963#M246504</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2024-05-17T02:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: java.lang.ClassNotFoundException: org.apache.nifi.bootstrap.RunNiFi Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/java-lang-ClassNotFoundException-org-apache-nifi-bootstrap/m-p/388034#M246512</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Navigate to the location of your NiFi installation.&lt;/P&gt;&lt;P&gt;Rename the folder to remove any spaces.&lt;/P&gt;&lt;P&gt;mv "NIFI 2.0.0M2" NIFI_2.0.0M2&lt;/P&gt;&lt;P&gt;Open your system environment variables settings.&lt;/P&gt;&lt;P&gt;Update the NIFI_HOME environment variable to the new path if it's set.&lt;/P&gt;&lt;P&gt;Ensure that the JAVA_HOME variable is correctly set and points to your Java installation directory.&lt;/P&gt;&lt;P&gt;Open the run-nifi.bat script to ensure it correctly references the new path. Look for any hardcoded paths that may still contain spaces and update them&lt;/P&gt;&lt;P&gt;Execute the run-nifi.bat file again to start NiFi. It should now correctly locate the org.apache.nifi.bootstrap.RunNiFi class and proceed without the previous errors.&lt;/P&gt;&lt;P&gt;Check JAVA_HOME: Make sure that the JAVA_HOME environment variable is correct.Ensure it points to a valid Java installation path&lt;/P&gt;&lt;P&gt;echo %JAVA_HOME%&lt;/P&gt;</description>
      <pubDate>Sun, 19 May 2024 06:26:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/java-lang-ClassNotFoundException-org-apache-nifi-bootstrap/m-p/388034#M246512</guid>
      <dc:creator>RAGHUY</dc:creator>
      <dc:date>2024-05-19T06:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: java.lang.ClassNotFoundException: org.apache.nifi.bootstrap.RunNiFi Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/java-lang-ClassNotFoundException-org-apache-nifi-bootstrap/m-p/388052#M246515</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/101097"&gt;@RAGHUY&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;Thanks for your reply but Im not sure you offered anything new besides what I stated in my post.&amp;nbsp; The run.bat which I dont touch or recommend anyone to touch uses relative paths and checks for system variables like %JAVA_HOME% and will return an error if its not found or set incorrectly (different kind of error). Maybe there is a way to ensure that the run.bat and the referenced file "nifi-env.bat" where the NIFI_ROOT is being set is taking care of whitesapces in the path. I tried different things&amp;nbsp; like surrounding the "NIFI_ROOT" with double quotes where referenced but it did not help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 May 2024 14:34:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/java-lang-ClassNotFoundException-org-apache-nifi-bootstrap/m-p/388052#M246515</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2024-05-19T14:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: java.lang.ClassNotFoundException: org.apache.nifi.bootstrap.RunNiFi Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/java-lang-ClassNotFoundException-org-apache-nifi-bootstrap/m-p/388127#M246541</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;This is not a new problem, but rather something that has existed with NiFi on Windows fro a very long time.&amp;nbsp; You'll need to avoid using space in directory names or warp that directory name in quotes to avoid the issue.&lt;BR /&gt;&lt;SPAN class="issue-link-key"&gt;&lt;A href="https://issues.apache.org/jira/browse/NIFI-200" target="_blank"&gt;NIFI-200&lt;/A&gt; -&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="issue-link-summary"&gt;Bootstrap loader doesn't handle directories with spaces in it on Windows&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help our community thrive. If you found&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;any&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Accept as Solution&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;" on&amp;nbsp;&lt;STRONG&gt;one or more&lt;/STRONG&gt;&amp;nbsp;of them that helped.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2024 19:36:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/java-lang-ClassNotFoundException-org-apache-nifi-bootstrap/m-p/388127#M246541</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2024-05-20T19:36:21Z</dc:date>
    </item>
  </channel>
</rss>

