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

After 2.320 upgrade: errors in maven project (com.google.inject.CreationException: Unable to create injector))

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • core, maven-plugin
    • Jenkins 2.320, Maven Integration plugin 3.15.1, Maven Metadata Plugin for Jenkins CI server 2.0.0, Maven Release Plug-in Plug-in 0.16.2

      After Upgrading from Jenkins 2.319 to Jenkins 2.320 yesterday (following the instructions to update all plugins both before and after the upgrade), all maven projects started to failed with below error.
      Reverting to Jenkins 2.319 solved the issue. It's possible that this is not Jenkins core but a specific (maven) plugin missing a Guava upgrade, but since no updates are available as yet this is definitely a problem.

       > D:\ServApps\git\cmd\git.exe rev-list --no-walk a0269ab032c7e39a61878026a47e57101b708c50 # timeout=10 > D:\ServApps\git\cmd\git.exe rev-list --no-walk a0269ab032c7e39a61878026a47e57101b708c50 # timeout=10Posting build status of INPROGRESS to Bitbucket for commit id [58ab50ad71228eb727b30f32f951d00a294b4125] and ref 'refs/heads/feature/refactor-ajax-calls'Parsing POMsERROR: Processing failed due to a bug in the code. Please report this to the issue tracker (https://jenkins.io/redirect/report-an-issue).com.google.inject.CreationException: Unable to create injector, see the following errors:
      1) Error injecting method, java.lang.NoSuchMethodError: com.google.common.base.Objects.toStringHelper(Ljava/lang/Class;)Lcom/google/common/base/Objects$ToStringHelper;  at org.eclipse.sisu.inject.DefaultBeanLocator.autoPublish(DefaultBeanLocator.java:197)  at org.codehaus.plexus.DefaultPlexusContainer$ContainerModule.configure(DefaultPlexusContainer.java:834) (via modules: org.eclipse.sisu.wire.WireModule -> org.codehaus.plexus.DefaultPlexusContainer$ContainerModule)
      1 error at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:466) at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:176) at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110) at com.google.inject.Guice.createInjector(Guice.java:96) at com.google.inject.Guice.createInjector(Guice.java:73) at com.google.inject.Guice.createInjector(Guice.java:62) at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:481) at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:206) at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:168) at hudson.maven.MavenEmbedderUtils.buildPlexusContainer(MavenEmbedderUtils.java:166) at hudson.maven.MavenEmbedderUtils.buildPlexusContainer(MavenEmbedderUtils.java:159) at hudson.maven.MavenEmbedder.<init>(MavenEmbedder.java:110) at hudson.maven.MavenEmbedder.<init>(MavenEmbedder.java:137) at hudson.maven.MavenUtil.createEmbedder(MavenUtil.java:211) at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1324) at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1124) at hudson.FilePath.act(FilePath.java:1171) at hudson.FilePath.act(FilePath.java:1154) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:985) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:689) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:520) at hudson.model.Run.execute(Run.java:1888) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) at hudson.model.ResourceController.execute(ResourceController.java:99) at hudson.model.Executor.run(Executor.java:432)Caused by: java.lang.NoSuchMethodError: com.google.common.base.Objects.toStringHelper(Ljava/lang/Class;)Lcom/google/common/base/Objects$ToStringHelper; at com.google.inject.internal.InstanceBindingImpl.toString(InstanceBindingImpl.java:92) at java.base/java.lang.String.valueOf(String.java:2951) at java.base/java.lang.StringBuilder.append(StringBuilder.java:168) at org.eclipse.sisu.inject.Logs.toString(Logs.java:205) at org.eclipse.sisu.inject.InjectorBindings.toString(InjectorBindings.java:129) at java.base/java.lang.String.valueOf(String.java:2951) at java.base/java.lang.StringBuilder.append(StringBuilder.java:168) at org.eclipse.sisu.inject.Logs.format(Logs.java:257) at org.eclipse.sisu.inject.Logs.trace(Logs.java:103) at org.eclipse.sisu.inject.DefaultBeanLocator.add(DefaultBeanLocator.java:91) at org.eclipse.sisu.inject.DefaultBeanLocator.staticAutoPublish(DefaultBeanLocator.java:203) at org.eclipse.sisu.inject.DefaultBeanLocator.autoPublish(DefaultBeanLocator.java:197) at org.eclipse.sisu.inject.DefaultBeanLocator$$FastClassByGuice$$5c8e0cfd.invoke(<generated>) at com.google.inject.internal.cglib.reflect.$FastMethod.invoke(FastMethod.java:53) at com.google.inject.internal.SingleMethodInjector$1.invoke(SingleMethodInjector.java:57) at com.google.inject.internal.SingleMethodInjector.inject(SingleMethodInjector.java:91) at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132) at com.google.inject.internal.MembersInjectorImpl$1$1.call(MembersInjectorImpl.java:88) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115) at org.eclipse.sisu.bean.BeanScheduler$CycleActivator.onProvision(BeanScheduler.java:230) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126) at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68) at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:86) at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:80) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:80) at com.google.inject.internal.Initializer$InjectableReference.get(Initializer.java:174) at com.google.inject.internal.Initializer.injectAll(Initializer.java:108) at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:174) ... 23 more

          [JENKINS-67102] After 2.320 upgrade: errors in maven project (com.google.inject.CreationException: Unable to create injector))

          Mark Watzdorf created issue -
          Basil Crow made changes -
          Labels New: JEP-233

          Basil Crow added a comment -

          com.google.common.base.Objects#toStringHelper was indeed removed in Guava 21.0, but I cannot reproduce the problem either (a) by running maven-plugin's test suite against Jenkins 2.320 or (b) by creating a Maven job in the UI in Jenkins 2.320 building https://github.com/jglick/simple-maven-project-with-tests.git against Maven 3.8.3 and 3.6.3. Please refer to the 4th point in the Reporting issues section of the blog post:

          Provide steps to reproduce the issue from scratch on a minimal Jenkins installation; the scenario should fail when the steps are followed on Jenkins 2.320 or later and pass when the steps are followed on Jenkins 2.319 or earlier.

          Basil Crow added a comment - com.google.common.base.Objects#toStringHelper was indeed removed in Guava 21.0, but I cannot reproduce the problem either (a) by running maven-plugin 's test suite against Jenkins 2.320 or (b) by creating a Maven job in the UI in Jenkins 2.320 building https://github.com/jglick/simple-maven-project-with-tests.git against Maven 3.8.3 and 3.6.3. Please refer to the 4th point in the Reporting issues section of the blog post : Provide steps to reproduce the issue from scratch on a minimal Jenkins installation; the scenario should fail when the steps are followed on Jenkins 2.320 or later and pass when the steps are followed on Jenkins 2.319 or earlier.
          Basil Crow made changes -
          Epic Link New: JENKINS-65988 [ 211793 ]
          Basil Crow made changes -
          Labels Original: JEP-233 New: JEP-233 regression
          Basil Crow made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Basil Crow made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Basil Crow made changes -
          Remote Link New: This issue links to "jenkinsci/maven-plugin#230 (Web Link)" [ 27232 ]
          Basil Crow made changes -
          Assignee New: Basil Crow [ basil ]

          Basil Crow added a comment -

          Incremental build 3.16-rc2371.251c5f5ad078 is available for testing. The incremental build is available from: https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/main/maven-plugin/3.16-rc2371.251c5f5ad078/

          mwwatzdorf Can you please test the incremental build and confirm the issue is resolved? For instructions on how to install a custom build, see: https://www.jenkins.io/doc/book/managing/plugins/#advanced-installation

          Basil Crow added a comment - Incremental build 3.16-rc2371.251c5f5ad078 is available for testing. The incremental build is available from: https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/main/maven-plugin/3.16-rc2371.251c5f5ad078/ mwwatzdorf Can you please test the incremental build and confirm the issue is resolved? For instructions on how to install a custom build, see: https://www.jenkins.io/doc/book/managing/plugins/#advanced-installation

            Unassigned Unassigned
            mwwatzdorf Mark Watzdorf
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: