GemFire: Java 11 Compatibility issue impacting gathering statistics
search cancel

GemFire: Java 11 Compatibility issue impacting gathering statistics

book

Article ID: 294486

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

In Java 11+, changes were made to move a once public JVM API to be internal instead.

As a result, GemFire with Java 11+, is not able to gather key system metrics for statistics. This makes determining the root cause of some issues more difficult and sometimes impossible using the GemFire artifacts.

Environment

Product Version: 9.10
OS: A JDK issue, JAVA 11+

Resolution

As of GemFire 9.10.10, you need to add the following options to drive GemFire to generate the missing statistics.

Add the following when starting up your Java 11+ GemFire JVMs.


gfsh 

Add the following options to your gfsh start server command:

--J=--add-opens --J=jdk.management/com.sun.management.internal=ALL-UNNAMED


JDK 

If  you are not using gfsh, there are other ways to address this issue. This issue is discussed at length on various sites, including Stack Overflow. For an example, refer to Access com.sun.* classes from openjdk11 - Stack Overflow.

If you have JDK options, add the following to setenv to work around the issue:

JDK_JAVA_OPTIONS="--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED"


Note: Moving forward, the product will be compatible with the latest changes in Java 11 changes. We will update this article at some later date when we have released a version of GemFire compatible with the new Java 11 behavior.