When we try to start Gemfire Management Console in Java 17 and above versions, we will receive error as below:
Error:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2025-06-11 09:12:07.783 ERROR 803711 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.ExceptionInInitializerError
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:165) ~[spring-boot-2.7.18.jar!/:2.7.18]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:585) ~[spring-context-5.3.42.jar!/:5.3.42]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.18.jar!/:2.7.18]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732) ~[spring-boot-2.7.18.jar!/:2.7.18]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:409) ~[spring-boot-2.7.18.jar!/:2.7.18]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-2.7.18.jar!/:2.7.18]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300) ~[spring-boot-2.7.18.jar!/:2.7.18]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1289) ~[spring-boot-2.7.18.jar!/:2.7.18]
at com.vmware.gemfire.gmc.GemFireGuiBackendApplication.main(GemFireGuiBackendApplication.java:31) ~[classes!/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:569) ~[na:na]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[gemfire-management-console-1.3.1.jar:na]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[gemfire-management-console-1.3.1.jar:na]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[gemfire-management-console-1.3.1.jar:na]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) ~[gemfire-management-console-1.3.1.jar:na]
Caused by: java.lang.ExceptionInInitializerError: null
at org.apache.catalina.startup.Tomcat.<clinit>(Tomcat.java:1216) ~[tomcat-embed-core-9.0.99.jar!/:na]
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:194) ~[spring-boot-2.7.18.jar!/:2.7.18]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:184) ~[spring-boot-2.7.18.jar!/:2.7.18]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:162) ~[spring-boot-2.7.18.jar!/:2.7.18]
... 16 common frames omitted
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field static final boolean java.io.FileSystem.useCanonCaches accessible: module java.base does not "opens java.io" to unnamed module @1bc6a36e
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) ~[na:na]
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[na:na]
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178) ~[na:na]
at java.base/java.lang.reflect.Field.setAccessible(Field.java:172) ~[na:na]
at org.apache.tomcat.util.compat.JreCompat.<clinit>(JreCompat.java:131) ~[tomcat-util-9.0.99.jar!/:9.0.99]
... 20 common frames omitted
NA
When using Java 17 and above the Tanzu GemFire Management Console requires the below access flags to be added, along with '--add-opens java.base/java.lang=ALL-UNNAMED' and '--add-opens java.base/java.util=ALL-UNNAMED'
--add-opens java.base/java.io=ALL-UNNAMED
Add --add-opens java.base/java.io=ALL-UNNAMED while executing gemfire-management-console-x.x.x.jar
Example command with gemfire-management-console-1.3.1.jar:
java --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED -jar /home/ubuntu/gemfire-management-console-1.3.1.jar --server.port=7077