Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52017

Metrics Plugin relies on un-exposed module API

    Details

    • Similar Issues:
    • Released As:
      4.0.2.3

      Description

      Starting up with the Metrics plugin installed and Java 10 shows the following stack trace (Jenkins still starts though):

       

      Jun 18, 2018 5:03:23 PM hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error
      WARNING: Failed to instantiate Key[type=jenkins.metrics.impl.VMMetricProviderImpl, annotation=[none]]; skipping this component
      com.google.inject.ProvisionException: Unable to provision, see the following errors:

      1) Error injecting constructor, java.lang.reflect.InaccessibleObjectException: Unable to make public long com.sun.management.internal.OperatingSystemImpl.getProcessCpuTime() accessible: module jdk.management does not "opens com.sun.management.internal" to unnamed module @1ae408df
      at jenkins.metrics.impl.VMMetricProviderImpl.<init>(VMMetricProviderImpl.java:61)

      1 error
      at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52)
      at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
      at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:432)
      at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
      at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
      at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
      at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
      at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:394)
      at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:385)
      at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:493)
      at hudson.ExtensionList.load(ExtensionList.java:380)
      at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
      at hudson.ExtensionList.iterator(ExtensionList.java:172)
      at jenkins.metrics.api.Metrics.afterExtensionsAugmented(Metrics.java:338)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
      at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
      at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
      at jenkins.model.Jenkins$5.runTask(Jenkins.java:1068)
      at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
      at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      at java.base/java.lang.Thread.run(Thread.java:844)
      Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make public long com.sun.management.internal.OperatingSystemImpl.getProcessCpuTime() accessible: module jdk.management does not "opens com.sun.management.internal" to unnamed module @1ae408df
      at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:337)
      at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:281)
      at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:198)
      at java.base/java.lang.reflect.Method.setAccessible(Method.java:192)
      at jenkins.metrics.impl.VMMetricProviderImpl$CpuUsageGauge.<init>(VMMetricProviderImpl.java:226)
      at jenkins.metrics.impl.VMMetricProviderImpl.<init>(VMMetricProviderImpl.java:71)
      at jenkins.metrics.impl.VMMetricProviderImpl$$FastClassByGuice$$bd4f8b03.newInstance(<generated>)
      at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
      at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
      at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
      at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
      at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
      at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
      at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
      at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
      ... 26 more

        Attachments

          Issue Links

            Activity

            svanoort Sam Van Oort created issue -
            svanoort Sam Van Oort made changes -
            Field Original Value New Value
            Epic Link JENKINS-40689 [ 177392 ]
            stephenconnolly Stephen Connolly made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Incomplete [ 4 ]
            oleg_nenashev Oleg Nenashev made changes -
            Labels java10 java10_hackathon java10 java10_hackathon java11
            batmat Baptiste Mathus made changes -
            Link This issue relates to JENKINS-53688 [ JENKINS-53688 ]
            batmat Baptiste Mathus made changes -
            Labels java10 java10_hackathon java11 java10 java10_hackathon java11 java11-compatibility
            batmat Baptiste Mathus made changes -
            Resolution Incomplete [ 4 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            batmat Baptiste Mathus made changes -
            Labels java10 java10_hackathon java11 java11-compatibility illegalReflectiveAccess java10 java10_hackathon java11 java11-compatibility
            markewaite Mark Waite made changes -
            Link This issue is duplicated by JENKINS-53688 [ JENKINS-53688 ]
            markewaite Mark Waite made changes -
            Link This issue relates to JENKINS-53688 [ JENKINS-53688 ]
            oleg_nenashev Oleg Nenashev made changes -
            Epic Link JENKINS-40689 [ 177392 ] JENKINS-51805 [ 191255 ]
            alecharp Adrien Lecharpentier made changes -
            Link This issue is blocked by JENKINS-55173 [ JENKINS-55173 ]
            alecharp Adrien Lecharpentier made changes -
            Link This issue is blocked by JENKINS-55173 [ JENKINS-55173 ]
            alecharp Adrien Lecharpentier made changes -
            Link This issue is duplicated by JENKINS-55173 [ JENKINS-55173 ]
            batmat Baptiste Mathus made changes -
            Labels illegalReflectiveAccess java10 java10_hackathon java11 java11-compatibility illegalReflectiveAccess java10 java10_hackathon java11 java11-compatibility triaged
            alecharp Adrien Lecharpentier made changes -
            Assignee Adrien Lecharpentier [ alecharp ]
            alecharp Adrien Lecharpentier made changes -
            Status Reopened [ 4 ] Open [ 1 ]
            alecharp Adrien Lecharpentier made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            alecharp Adrien Lecharpentier made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            alecharp Adrien Lecharpentier made changes -
            Remote Link Cette demande est liée à "metrics-plugin#PR-42 (Lien Web)" [ 22142 ]
            alecharp Adrien Lecharpentier made changes -
            Status In Review [ 10005 ] In Progress [ 3 ]
            alecharp Adrien Lecharpentier made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            alecharp Adrien Lecharpentier made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Released As 4.0.2.3
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue is duplicated by JENKINS-58603 [ JENKINS-58603 ]

              People

              • Assignee:
                alecharp Adrien Lecharpentier
                Reporter:
                svanoort Sam Van Oort
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: