2

I installed cassandra on mac using this command brew install cassandra. I ran this command (cassandra -f) to start the DB but getting the following exception.

Caused by: java.lang.NumberFormatException: For input string: "openj9-0"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65).

Java Version: enter image description here

In this link https://youtrack.jetbrains.com/issue/UP-10379 it is mentioned that database doesn't support OpenJ9. The fix is planned for Cassandra 4.0 which hasn't been released yet.

I installed the latest version of cassandra which is 4.0.3, still I am facing issue.

Any solution or alternative??

If there is no solution then How can I switch from openJ9 VM to Hotspot JVM (which is compatible with cassandra).

APK
  • 155
  • 1
  • 15

1 Answers1

1

The Eclipse Openj9 JVM is still not supported even in Cassandra 4.0 (CASSANDRA-14883).

I would suggest you use either OpenJDK 8 or 11 as I've documented in Installing Cassandra. (Note to readers: Java 11 only works with Cassandra 4. Earlier versions of Cassandra only supports Java 8.)

The Apache Cassandra test infrastructure is setup with Hotspot VM and we are currently focused on testing/certifying Java 17 LTS. For the record, I'm not saying that OpenJ9 won't be supported -- just that there is probably limited motivation to do so given our limited resources. Cheers!

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23
  • When I check java -version, I get below details. I attached the same as screenshot as part of question. openjdk version "1.8.0_275" OpenJDK Runtime Environment (build 1.8.0_275-b01) Eclipse OpenJ9 VM (build openj9-0.23.0, JRE 1.8.0 Mac OS X amd64-64-Bit Compressed References 20201112_760 (JIT enabled, AOT enabled) is it not openJDK 8 ??? – APK Mar 29 '22 at 08:16
  • I ran this command 'brew services start cassandra'. it successfully started cassandra but when I ran this command ''cassandra -f" to start the DB it was throwing the above error. Any idea why is that so?? – APK Mar 30 '22 at 06:12
  • As I stated in my answer, OpenJ9 VM is not supported -- only Hotspot VM. Cheers! – Erick Ramirez Mar 30 '22 at 23:49
  • Hi, I have heard that openj9 has very big performance improvement. So will we have it in the future? – ch271828n Apr 06 '22 at 12:01