I am getting the below error in server log in Java 11. Is there any solution for it?
[2019-05-02 18:06:18 IST] [] ERROR com.codahale.metrics.ScheduledReporter [SID= UID= BGCD=] - Exception thrown from Slf4jReporter#report. Exception was suppressed.
java.lang.reflect.InaccessibleObjectException: Unable to make public long com.sun.management.internal.OperatingSystemImpl.getOpenFileDescriptorCount() accessible: module jdk.management does not "opens com.sun.management.internal" to unnamed module @489448ac
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:340)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:280)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:198)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:192)
at deployment.myPage.war//com.codahale.metrics.jvm.FileDescriptorRatioGauge.invoke(FileDescriptorRatioGauge.java:48)
at deployment.myPage.war//com.codahale.metrics.jvm.FileDescriptorRatioGauge.getRatio(FileDescriptorRatioGauge.java:35)
at deployment.myPage.war//com.codahale.metrics.RatioGauge.getValue(RatioGauge.java:64)
at deployment.myPage.war//com.codahale.metrics.RatioGauge.getValue(RatioGauge.java:11)
at deployment.myPage.war//com.codahale.metrics.DerivativeGauge.getValue(DerivativeGauge.java:23)
at deployment.myPage.war//com.codahale.metrics.Slf4jReporter.logGauge(Slf4jReporter.java:306)
at deployment.myPage.war//com.codahale.metrics.Slf4jReporter.report(Slf4jReporter.java:220)
at deployment.myPage.war//com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:243)
at deployment.myPage.war//com.codahale.metrics.ScheduledReporter$1.run(ScheduledReporter.java:182)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)