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

java.lang.LinkageError when installing - DashboardPortlet not present

      After installation of Delivery Pipeline 1.0.1 (the latest at this time), I've got this error in Jenkins Logs and Delivery Pipeline doesn't work as expected.

      The complete stack trace is the following :

      May 25, 2017 7:20:25 AM jenkins.InitReactorRunner$1 onAttained
      INFO: Listed all plugins
      May 25, 2017 7:20:28 AM hudson.ExtensionFinder$GuiceFinder$SezpozModule configure
      WARNING: Failed to load se.diabol.jenkins.pipeline.portlet.DeliveryPipelineViewPortlet$DescriptorImpl
      java.lang.LinkageError: Failed to resolve class se.diabol.jenkins.pipeline.portlet.DeliveryPipelineViewPortlet$DescriptorImpl
      {{ at hudson.ExtensionFinder$GuiceFinder$SezpozModule.resolve(ExtensionFinder.java:489)}}
      {{ at hudson.ExtensionFinder$GuiceFinder$SezpozModule.configure(ExtensionFinder.java:506)}}
      {{ at com.google.inject.AbstractModule.configure(AbstractModule.java:62)}}
      {{ at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)}}
      {{ at com.google.inject.spi.Elements.getElements(Elements.java:110)}}
      {{ at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)}}
      {{ at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)}}
      {{ at com.google.inject.Guice.createInjector(Guice.java:96)}}
      {{ at com.google.inject.Guice.createInjector(Guice.java:73)}}
      {{ at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:280)}}
      {{ at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)}}
      {{ at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)}}
      {{ at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)}}
      {{ at java.lang.reflect.Constructor.newInstance(Constructor.java:423)}}
      {{ at java.lang.Class.newInstance(Class.java:442)}}
      {{ at net.java.sezpoz.IndexItem.instance(IndexItem.java:181)}}
      {{ at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:634)}}
      {{ at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:609)}}
      {{ at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:472)}}
      {{ at hudson.ExtensionList.load(ExtensionList.java:365)}}
      {{ at hudson.ExtensionList.ensureLoaded(ExtensionList.java:303)}}
      {{ at hudson.ExtensionList.getComponents(ExtensionList.java:168)}}
      {{ at jenkins.model.Jenkins$8.onInitMilestoneAttained(Jenkins.java:1120)}}
      {{ at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:82)}}
      {{ at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:104)}}
      {{ at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:176)}}
      {{ at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)}}
      {{ at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)}}
      {{ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)}}
      {{ at java.lang.Thread.run(Thread.java:745)}}
      Caused by: java.lang.TypeNotPresentException: Type hudson.plugins.view.dashboard.DashboardPortlet not present
      {{ at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117)}}
      {{ at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)}}
      {{ at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)}}
      {{ at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68)}}
      {{ at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138)}}
      {{ at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)}}
      {{ at sun.reflect.generics.repository.ClassRepository.getSuperclass(ClassRepository.java:90)}}
      {{ at java.lang.Class.getGenericSuperclass(Class.java:777)}}
      {{ at hudson.ExtensionFinder$GuiceFinder$SezpozModule.resolve(ExtensionFinder.java:470)}}
      {{ ... 29 more}}
      Caused by: java.lang.ClassNotFoundException: hudson.plugins.view.dashboard.DashboardPortlet
      {{ at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1373)}}
      {{ at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)}}
      {{ at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)}}
      {{ at java.lang.ClassLoader.loadClass(ClassLoader.java:357)}}
      {{ at java.lang.Class.forName0(Native Method)}}
      {{ at java.lang.Class.forName(Class.java:348)}}
      {{ at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)}}
      {{ ... 37 more}}

          [JENKINS-44485] java.lang.LinkageError when installing - DashboardPortlet not present

          Same error with 2.64.2 (non Alpine) docker image.

          Jean-Marc Collin added a comment - Same error with 2.64.2 (non Alpine) docker image.

          Daniel Beck added a comment -

          Daniel Beck added a comment - Delivery Pipeline Plugin seems to have a mandatory dependency on Dashboard Plugin but declares it optional. Bug in Delivery Pipeline, unrelated to Jenkins core etc. https://github.com/Diabol/delivery-pipeline-plugin/blob/8b9bdc10cfaf5a4c9e41c4801d7f9ea38e2a3362/src/main/java/se/diabol/jenkins/pipeline/portlet/DeliveryPipelineViewPortlet.java#L32 https://github.com/Diabol/delivery-pipeline-plugin/blob/master/pom.xml#L499  

          Daniel Beck added a comment -

          Notably, nothing but what appears to be this optional feature seems affected, so should be safe to ignore.

          Daniel Beck added a comment - Notably, nothing but what appears to be this optional feature seems affected, so should be safe to ignore.

          Tommy Tynjä added a comment -

          As danielbeck mentions above, it's unfortunately required although the intention was to keep the dependency optional. This should only affect views used through the dashboard-view plugin. Workaround to avoid the error is to install the dashboard-view plugin.

          Community contribution to address this appreciated.

          Tommy Tynjä added a comment - As danielbeck mentions above, it's unfortunately required although the intention was to keep the dependency optional. This should only affect views used through the dashboard-view plugin. Workaround to avoid the error is to install the dashboard-view plugin. Community contribution to address this appreciated.

          Daniel Beck added a comment -

          tommysdk Any reason you didn't mark the @Extension(optional = true) ? That would indicate that loading errors are to be expected, so doesn't get a full stack trace.

          Daniel Beck added a comment - tommysdk Any reason you didn't mark the @Extension(optional = true) ? That would indicate that loading errors are to be expected, so doesn't get a full stack trace.

          Tommy Tynjä added a comment -

          danielbeck It was probably missed by the contributor of that feature. I am currently looking into this issue atm with the @Extension(optinal = true) approach.

          Tommy Tynjä added a comment - danielbeck It was probably missed by the contributor of that feature. I am currently looking into this issue atm with the @Extension(optinal = true) approach.

          Tommy Tynjä added a comment -

          Tommy Tynjä added a comment - Pull request with proposed solution: https://github.com/Diabol/delivery-pipeline-plugin/pull/258

          Tommy Tynjä added a comment -

          Pull request merged to master.

          Will be featured in next release.

          Tommy Tynjä added a comment - Pull request merged to master. Will be featured in next release.

          Tommy Tynjä added a comment -

          Released in Delivery Pipeline plugin 1.0.4.

          Tommy Tynjä added a comment - Released in Delivery Pipeline plugin 1.0.4.

            tommysdk Tommy Tynjä
            jmcollin Jean-Marc Collin
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: