{"record":{"id":"7d09f6dd37b31587","repo":"apache/cassandra","slug":"non-oracle-jvm-detected-some-features-such-as-i","errorCode":null,"errorMessage":"Non-Oracle JVM detected.  Some features, such as immediate unmap of compacted SSTables, may not work as intended","messagePattern":"Non-Oracle JVM detected\\.  Some features, such as immediate unmap of compacted SSTables, may not work as intended","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/service/StartupChecks.java","lineNumber":604,"sourceCode":"        @Override\n        public String name()\n        {\n            return \"jvm_options\";\n        }\n\n        @Override\n        public void execute(StartupChecksConfiguration configuration)\n        {\n            if (configuration.isDisabled(name()))\n                return;\n            // log warnings for different kinds of sub-optimal JVMs.  tldr use 64-bit Oracle >= 1.6u32\n            if (!DatabaseDescriptor.hasLargeAddressSpace())\n                logger.warn(\"32bit JVM detected.  It is recommended to run Cassandra on a 64bit JVM for better performance.\");\n\n            String javaVmName = JAVA_VM_NAME.getString();\n            if (!(javaVmName.contains(\"HotSpot\") || javaVmName.contains(\"OpenJDK\")))\n            {\n                logger.warn(\"Non-Oracle JVM detected.  Some features, such as immediate unmap of compacted SSTables, may not work as intended\");\n            }\n            else\n            {\n                checkOutOfMemoryHandling();\n            }\n        }\n\n        /**\n         * Checks that the JVM is configured to handle OutOfMemoryError\n         */\n        private void checkOutOfMemoryHandling()\n        {\n            if (JavaUtils.supportExitOnOutOfMemory(JAVA_VERSION.getString()))\n            {\n                if (!jvmOptionsContainsOneOf(\"-XX:OnOutOfMemoryError=\", \"-XX:+ExitOnOutOfMemoryError\", \"-XX:+CrashOnOutOfMemoryError\"))\n                    logger.warn(\"The JVM is not configured to stop on OutOfMemoryError which can cause data corruption.\"\n                                + \" Use one of the following JVM options to configure the behavior on OutOfMemoryError: \"\n                                + \" -XX:+ExitOnOutOfMemoryError, -XX:+CrashOnOutOfMemoryError, or -XX:OnOutOfMemoryError=\\\"<cmd args>;<cmd args>\\\"\");","sourceCodeStart":586,"sourceCodeEnd":622,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/StartupChecks.java#L586-L622","documentation":"The checkJVMArchitecture startup check warns when the JAVA_VM_NAME system property contains neither 'HotSpot' nor 'OpenJDK', meaning Cassandra is running on a non-HotSpot-compatible JVM (e.g. IBM J9, OpenJ9, HotSpot-derived forks with different names). Certain features such as immediate unmapping of compacted SSTables via sun.misc/Cleaner APIs may not behave correctly. This is a logged warning; startup proceeds.","triggerScenarios":"java.vm.name does not contain 'HotSpot' or 'OpenJDK' at startup; note that when this branch is taken, checkOutOfMemoryHandling() is skipped (only HotSpot/OpenJDK JVMs get the OOM-handling check).","commonSituations":"Running Cassandra on Eclipse OpenJ9/IBM J9 JVMs, Azul Zing, GraalVM with an unusual vm.name string, or vendor builds that rename java.vm.name.","solutions":["Switch to a HotSpot or OpenJDK-based JVM (e.g. Temurin, Corretto, Oracle JDK).","Check java.vm.name (`java -XshowSettings:properties -version`) and if it is actually HotSpot/OpenJDK under an odd vendor name, ignore the warning.","Pin the supported JDK version recommended by your Cassandra version in cassandra-env.sh.","Test compaction and memory-mapped behavior if you must stay on the alternate JVM."],"exampleFix":"// before\ncassandra-env.sh: JAVA_HOME=/usr/lib/jvm/ibm-java (OpenJ9)\n// after\ncassandra-env.sh: JAVA_HOME=/usr/lib/jvm/temurin-11-jdk-amd64","handlingStrategy":"validation","validationCode":"String vmName = System.getProperty(\"java.vm.name\", \"\");\nboolean hotSpotLike = vmName.contains(\"HotSpot\") || vmName.contains(\"OpenJDK\");\nif (!hotSpotLike) System.out.println(\"Unsupported JVM: \" + vmName + \"; use HotSpot/OpenJDK.\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Standardize on Temurin/Corretto/OpenJDK builds across the fleet.","Avoid vendor JVMs (J9, Zing) unless explicitly validated against your Cassandra version.","Verify java.vm.name after every JDK upgrade.","Keep JVM vendor/version in your provisioning playbook."],"tags":["jvm","startup-check","compatibility"],"backgroundTag":"unsupported-platform","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}