Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-95342

InaccessibleObjectException in LCS logs on JDK11

Details

    • 3
    • Red Hat OpenJDK 11

    Description

      Steps to reproduce:

      1. Deploy the Liferay Connected Services.lpkg if your bundle does not already have it
      2. Deploy a valid LCS .aatf token within the ${liferay.home}/data directory
      3. Start Portal and log in
      4. Navigate to Control Panel > Configuration > Liferay Connected Services
      5. View the LCS logs within the ${liferay.home}/logs/lcs.${date}.log file

      Result: The following error is found in the logs:

      2019-05-10 00:01:10.305 ERROR [LCS Worker 2][BaseScheduledTask:92] 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 @2e9d954b 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 @2e9d954b 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 com.yammer.metrics.core.VirtualMachineMetrics.fileDescriptorUsage(VirtualMachineMetrics.java:257) at com.liferay.lcs.client.internal.task.JVMMetricsTask.getFileDescriptorUsage(JVMMetricsTask.java:119) at com.liferay.lcs.client.internal.task.JVMMetricsTask.doRun(JVMMetricsTask.java:65) at com.liferay.lcs.client.internal.task.BaseScheduledTask.run(BaseScheduledTask.java:74) 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) at java.base/java.lang.Thread.run(Thread.java:834)
      

       

      Note: This doesn't seem to have any functional impact within Portal. The user is able to connect to LCS normally. The error may take some time to appear within the LCS logs after logging in. The workaround for a similar stacktrace specified in this comment did not resolve this issue.

      Reproduced on:
      Portal DXP 7.2.10 RC2
      Tomcat 9.0.17 + Hypersonic + Red Hat OpenJDK11 + CentOS7 4-bit

      Attachments

        Issue Links

          Activity

            People

              igor.beslic Igor Beslic
              joshua.chong Joshua Chong
              Kiyoshi Lee Kiyoshi Lee
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                3 years, 29 weeks, 3 days ago

                Packages

                  Version Package