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

Artifact Manager on S3 not compatible with GSON 2.10.1

    • 843.v87eb_5414d596

      Hi,
      We are having errors after upgrading to version 2.133.vfb_8a_7b_9c5dd1

      Also:   org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 5aa1bbae-2d3b-4835-ac16-d6c9731909d3
      hudson.remoting.ProxyException: com.google.inject.CreationException: Unable to create injector, see the following errors:
      
      1) [Guice/ErrorInCustomProvider]: NoSuchMethodError: 'void ConstructorConstructor.<init>(Map)'
        at GsonModule.provideGson(GsonModule.java:99)
            \_ installed by: AWSS3HttpApiModule -> GsonModule
        at GsonWrapper.<init>(GsonWrapper.java:38)
            \_ for 1st parameter
        at GsonWrapper.class(GsonWrapper.java:32)
        while locating GsonWrapper
        while locating Json
      
      Learn more:
        https://github.com/google/guice/wiki/ERROR_IN_CUSTOM_PROVIDER
      Caused by: NoSuchMethodError: 'void ConstructorConstructor.<init>(Map)'
      	at GsonModule.provideGson(GsonModule.java:130)
      	at GsonModule$$FastClassByGuice$$69f5f837.GUICE$TRAMPOLINE(<generated>)
      	at GsonModule$$FastClassByGuice$$69f5f837.apply(<generated>)
      	at ProviderMethod$FastClassProviderMethod.doProvision(ProviderMethod.java:260)
      	at ProviderMethod.doProvision(ProviderMethod.java:171)
      	at InternalProviderInstanceBindingImpl$CyclicFactory.provision(InternalProviderInstanceBindingImpl.java:185)
      	at InternalProviderInstanceBindingImpl$CyclicFactory.get(InternalProviderInstanceBindingImpl.java:162)
      	at ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
      	at SingletonScope$1.get(SingletonScope.java:169)
      	at InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
      	at SingleParameterInjector.inject(SingleParameterInjector.java:40)
      	at SingleParameterInjector.getAll(SingleParameterInjector.java:60)
      	at ConstructorInjector.provision(ConstructorInjector.java:113)
      	at ConstructorInjector.construct(ConstructorInjector.java:91)
      	at ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:300)
      	at ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
      	at SingletonScope$1.get(SingletonScope.java:169)
      	at InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
      	at FactoryProxy.get(FactoryProxy.java:60)
      	at InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:213)
      	at InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:186)
      	at InternalInjectorCreator.build(InternalInjectorCreator.java:113)
      	at Guice.createInjector(Guice.java:87)
      	at ContextBuilder.buildInjector(ContextBuilder.java:405)
      	at ContextBuilder.buildInjector(ContextBuilder.java:328)
      	at ContextBuilder.buildView(ContextBuilder.java:615)
      	at ContextBuilder.buildView(ContextBuilder.java:595)
      	at s3.S3BlobStore.getContext(S3BlobStore.java:136)
      	at JCloudsArtifactManager.getContext(JCloudsArtifactManager.java:384)
      	at JCloudsArtifactManager.stash(JCloudsArtifactManager.java:223)
      	at StashManager.stash(StashManager.java:118)
      	at StashStep$Execution.run(StashStep.java:119)
      	at StashStep$Execution.run(StashStep.java:107)
      	at SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      	at java.base/Executors$RunnableAdapter.call(Executors.java:539)
      	at java.base/FutureTask.run(FutureTask.java:264)
      	at java.base/ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      	at java.base/ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      	at java.base/Thread.run(Thread.java:840)
      
      2) [Guice/ErrorInCustomProvider]: NoSuchMethodError: 'void ConstructorConstructor.<init>(Map)'
        at GsonModule.provideGson(GsonModule.java:99)
            \_ installed by: AWSS3HttpApiModule -> GsonModule
        while locating Gson 

      It might be related to this change: Use gson-api plugin by jonesbusy · Pull Request #131 · jenkinsci/trilead-api-plugin (github.com)

      Please help. Thank you.

          [JENKINS-72441] Artifact Manager on S3 not compatible with GSON 2.10.1

          Marc Joseph created issue -
          Marc Joseph made changes -
          Summary Original: Errors after upgrading to version 2.133.vfb_8a_7b_9c5dd1 New: GSONModule Errors after upgrading to version 2.133.vfb_8a_7b_9c5dd1
          Ivan Fernandez Calvo made changes -
          Priority Original: Blocker [ 1 ] New: Trivial [ 5 ]

          Ivan Fernandez Calvo added a comment - - edited

          trilead-api-plugin is an empty plugin to provide the trilead-ssh2 library, this last update does not have a bump of the trilead-ssh2 library only Jenkins plugin and BOM version updates and a few developer changes that do not affect users. trileas-api-plugin nor trilead-ssh2 do not use GSONModule. You stack trace point to JCloudsArtifactManager I dunno the cause

          https://plugins.jenkins.io/artifact-manager-s3/

          Ivan Fernandez Calvo added a comment - - edited trilead-api-plugin is an empty plugin to provide the trilead-ssh2 library, this last update does not have a bump of the trilead-ssh2 library only Jenkins plugin and BOM version updates and a few developer changes that do not affect users. trileas-api-plugin nor trilead-ssh2 do not use GSONModule. You stack trace point to JCloudsArtifactManager I dunno the cause https://plugins.jenkins.io/artifact-manager-s3/
          Ivan Fernandez Calvo made changes -
          Component/s New: artifact-manager-s3-plugin [ 23538 ]
          Component/s Original: trilead-api-plugin [ 22324 ]
          Ivan Fernandez Calvo made changes -
          Assignee Original: Ivan Fernandez Calvo [ ifernandezcalvo ]

          Marc Joseph added a comment - - edited

          Hi ifernandezcalvo,

          Thanks for the prompt response.
          I created the issue here since this is the only plugin I updated today and everything was working previously.
          Did you check this pull request to trilead-api-plugin? Use gson-api plugin by jonesbusy · Pull Request #131 · jenkinsci/trilead-api-plugin (github.com)
          Is this not related to the GSONModule error? Should I create the issue in https://plugins.jenkins.io/artifact-manager-s3/ instead?

          Marc Joseph added a comment - - edited Hi ifernandezcalvo , Thanks for the prompt response. I created the issue here since this is the only plugin I updated today and everything was working previously. Did you check this pull request to trilead-api-plugin? Use gson-api plugin by jonesbusy · Pull Request #131 · jenkinsci/trilead-api-plugin (github.com) Is this not related to the GSONModule error? Should I create the issue in https://plugins.jenkins.io/artifact-manager-s3/ instead?
          Ivan Fernandez Calvo made changes -
          Component/s New: trilead-api-plugin [ 22324 ]

          Ivan Fernandez Calvo added a comment - - edited

          Shit, I forgot that PR, so the problem is that the gson-api plugin is not in all plugins and uses an incompatible version with the version used by the artifact-manager-s3. It should use the gson-api-plugin to avoid having different versions of the library.

          I put it in the components of this issue, for the moment the workaround is to downgrade the trilead-api-plugin and probably remove the gson-api-plugin if it was not installed before.

          Ivan Fernandez Calvo added a comment - - edited Shit, I forgot that PR, so the problem is that the gson-api plugin is not in all plugins and uses an incompatible version with the version used by the artifact-manager-s3. It should use the gson-api-plugin to avoid having different versions of the library. I put it in the components of this issue, for the moment the workaround is to downgrade the trilead-api-plugin and probably remove the gson-api-plugin if it was not installed before.
          Ivan Fernandez Calvo made changes -
          Priority Original: Trivial [ 5 ] New: Major [ 3 ]

            jonesbusy Valentin Delaye
            datariomj Marc Joseph
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: