title: Unable to access Cassandra NoSQL DB after installation
body: <p>I installed Cassandra stable version in My Ubuntu 20.04. Java JDK 11 is my default version.
  When I run the below code I am getting the following error.</p>
  <pre><code>(base) vijee@vijee-Lenovo-IdeaPad-S510p:~$ sudo nodetool status
  ERROR 13:18:40,031 Cannot initialize un-mmaper.  (Are you using a non-Oracle JVM?)  Compacted data files will not be removed promptly.  Consider using an Oracle JVM or using standard disk access mode
  java.lang.NoSuchMethodError: 'sun.misc.Cleaner sun.nio.ch.DirectBuffer.cleaner()'
      at org.apache.cassandra.io.util.FileUtils.&lt;clinit&gt;(FileUtils.java:75) ~[apache-cassandra-3.11.9.jar:3.11.9]
      at org.apache.cassandra.utils.FBUtilities.getToolsOutputDirectory(FBUtilities.java:880) ~[apache-cassandra-3.11.9.jar:3.11.9]
      at org.apache.cassandra.tools.NodeTool.printHistory(NodeTool.java:216) ~[apache-cassandra-3.11.9.jar:3.11.9]
      at org.apache.cassandra.tools.NodeTool.execute(NodeTool.java:184) ~[apache-cassandra-3.11.9.jar:3.11.9]
      at org.apache.cassandra.tools.NodeTool.main(NodeTool.java:56) ~[apache-cassandra-3.11.9.jar:3.11.9]
  error: null
  -- StackTrace --
  java.lang.NullPointerException
      at org.apache.cassandra.config.DatabaseDescriptor.getDiskFailurePolicy(DatabaseDescriptor.java:1975)
      at org.apache.cassandra.utils.JVMStabilityInspector.inspectThrowable(JVMStabilityInspector.java:102)
      at org.apache.cassandra.utils.JVMStabilityInspector.inspectThrowable(JVMStabilityInspector.java:60)
      at org.apache.cassandra.io.util.FileUtils.&lt;clinit&gt;(FileUtils.java:81)
      at org.apache.cassandra.utils.FBUtilities.getToolsOutputDirectory(FBUtilities.java:880)
      at org.apache.cassandra.tools.NodeTool.printHistory(NodeTool.java:216)
      at org.apache.cassandra.tools.NodeTool.execute(NodeTool.java:184)
      at org.apache.cassandra.tools.NodeTool.main(NodeTool.java:56)
  </code></pre>
  <p>I have Below Java versions available in my system.</p>
  <pre><code> (base) vijee@vijee-Lenovo-IdeaPad-S510p:~/Downloads/youtubevideos$ sudo update-alternatives --config java
  There are 2 choices for alternative java (providing /usr/bin/java).
  
    Selection    Path                                            Priority   Status
  ------------------------------------------------------------
    0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      auto mode
    1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      manual mode
  * 2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode
  </code></pre>
  <p>I know Cassandra will support only JDK 8. In some blogs, they say we can assign Java 8 as JAVA_HOME for Cassandra. Where should I do the change of JAVA_HOME for Cassandra?
  Already in .bashrc I have set JAVA_HOME as JDK 8 for Hadoop installation.</p>
  <pre><code>export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
  export PATH=&quot;$PATH:$JAVA_HOME/bin&quot;
  export PATH=&quot;/home/vijee/anaconda3/bin:$PATH&quot;
  
  export HADOOP_HOME=/home/vijee/hadoop-2.7.7
  export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
  export HADOOP_INSTALL=$HADOOP_HOME
  export HADOOP_MAPRED_HOME=$HADOOP_HOME
  export HADOOP_COMMON_HOME=$HADOOP_HOME
  export HADOOP_HDFS_HOME=$HADOOP_HOME
  export YARN_HOME=$HADOOP_HOME
  export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
  export PATH=&quot;$PATH:$HADOOP_HOME/sbin:$HADOOP_HOME/bin&quot;
  export HADOOP_OPTS=&quot;-Djava.library.path=$HADOOP_HOME/lib/native&quot;
  </code></pre>
  <p>In the blog, everybody gave different solutions? I am largely confused with that.</p>
  <ol>
  <li>What changes should I do to access Cassandra? or</li>
  <li>Can I install Cassandra 4(beta)?</li>
  </ol>