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 added a comment -

          Hi ifernandezcalvo,

          I was able to work around the issue by rolling back trilead-api-plugin to version 2.84.v72119de229b_7 from 2.133.vfb_8a_7b_9c5dd1
          jenkinsci/gson-api-plugin: GSON API plugin (github.com) is a dependency of trilead-api-plugin.
          Changing the component again of this ticket to trilead-api-plugin. Let me know if this should be transferred to gson-api-plugin instead.
          Thank you.

          Marc Joseph added a comment - Hi ifernandezcalvo , I was able to work around the issue by rolling back trilead-api-plugin to version 2.84.v72119de229b_7 from 2.133.vfb_8a_7b_9c5dd1 jenkinsci/gson-api-plugin: GSON API plugin (github.com) is a dependency of trilead-api-plugin. Changing the component again of this ticket to trilead-api-plugin. Let me know if this should be transferred to gson-api-plugin instead. Thank you.

          the gson-api-plugin is not in Jira so I have reported the issue in GitHub https://github.com/jenkinsci/gson-api-plugin/issues/7

          Ivan Fernandez Calvo added a comment - the gson-api-plugin is not in Jira so I have reported the issue in GitHub https://github.com/jenkinsci/gson-api-plugin/issues/7

          I have added a note of the breaking change and the issue in the release notes https://github.com/jenkinsci/trilead-api-plugin/releases/tag/2.133.vfb_8a_7b_9c5dd1

          Ivan Fernandez Calvo added a comment - I have added a note of the breaking change and the issue in the release notes https://github.com/jenkinsci/trilead-api-plugin/releases/tag/2.133.vfb_8a_7b_9c5dd1

          Marc Joseph added a comment -

          Saw the comment from jonesbusy.
          Here's the full list of my plugins:

           

          trilead-api:2.133.vfb_8a_7b_9c5dd1
          ansicolor:1.0.4
          ant:497.v94e7d9fffa_b_9
          antisamy-markup-formatter:162.v0e6ec0fcfcf6
          apache-httpcomponents-client-4-api:4.5.14-208.v438351942757
          artifact-manager-s3:822.vf129d4836c31
          atlassian-jira-software-cloud:2.0.11
          audit-trail:361.v82cde86c784e
          aws-credentials:218.v1b_e9466ec5da_
          aws-java-sdk:1.12.610-428.v849169a_01b_a_5
          bootstrap5-api:5.3.2-3
          bouncycastle-api:2.30.1.77-225.v26ea_c9455fd9
          branch-api:2.1135.v8de8e7899051
          build-monitor-plugin:1.14-745.ve2023a_305f40
          build-timeout:1.31
          build-user-vars-plugin:1.9
          caffeine-api:3.1.8-133.v17b_1ff2e0599
          checks-api:2.0.2
          cloudbees-disk-usage-simple:187.v6378d330d1d4
          cloudbees-folder:6.858.v898218f3609d
          command-launcher:107.v773860566e2e
          commons-lang3-api:3.13.0-62.v7d18e55f51e2
          commons-text-api:1.11.0-95.v22a_d30ee5d36
          config-file-provider:959.vcff671a_4518b_
          configuration-as-code:1763.vb_fe9c1b_83f7b
          copyartifact:722.v0662a_9b_e22a_c
          credentials-binding:642.v737c34dea_6c2
          credentials:1311.vcf0a_900b_37c2
          dark-theme:410.v3095e2c26b_17
          devops-portal:415.vaf57f86bb4d1
          discard-old-build:1.07
          display-url-api:2.200.vb_9327d658781
          docker-commons:439.va_3cb_0a_6a_fb_29
          docker-workflow:572.v950f58993843
          dotcoverrunner:1.0.7
          dotnet-sdk:1.4.0
          durable-task:523.va_a_22cf15d5e0
          ec2-fleet:3.2.0
          echarts-api:5.4.3-2
          elastic-axis:464.va_7ed499b_9d75
          email-ext:2.102
          embeddable-build-status:459.v428d6761597b_
          font-awesome-api:6.5.1-1
          git-changelog:3.36
          git-client:4.6.0
          git:5.2.1
          github-api:1.318-461.v7a_c09c9fa_d63
          github-branch-source:1767.va_7d01ea_c7256
          github-checks:554.vb_ee03a_000f65
          github-oauth:597.ve0c3480fcb_d0
          github:1.37.3.1
          gradle:2.9
          inline-pipeline:1.0.3
          instance-identity:185.v303dc7c645f9
          jackson2-api:2.15.3-372.v309620682326
          jacoco:3.3.5
          javadoc:243.vb_b_503b_b_45537
          javax-mail-api:1.6.2-9
          jaxb:2.3.9-1
          jdk-tool:73.vddf737284550
          jira:3.12
          job-dsl:1.87
          jobcacher:409.vc3fde9f9b_f30
          jobConfigHistory:1229.v3039470161a_d
          jquery3-api:3.7.1-1
          junit:1252.vfc2e5efa_294f
          last-changes:2.7.11
          ldap:711.vb_d1a_491714dc
          mailer:463.vedf8358e006b_
          matrix-auth:3.2.1
          matrix-project:822.v01b_8c85d16d2
          maven-plugin:3.23
          metrics:4.2.18-442.v02e107157925
          mina-sshd-api-common:2.11.0-86.v836f585d47fa_
          mina-sshd-api-core:2.11.0-86.v836f585d47fa_
          monitoring:1.95.0
          msbuild:1.30
          nodejs:1.6.1
          nodelabelparameter:1.12.0
          nuget:1.1
          nunit:442.v157a_e8448a_d7
          octopusdeploy:4.0.0
          okhttp-api:4.11.0-157.v6852a_a_fa_ec11
          pam-auth:1.10
          pipeline-build-step:540.vb_e8849e1a_b_d8
          pipeline-giphy-api:2.0.1
          pipeline-github:2.8-155.8eab375ac9f8
          pipeline-groovy-lib:689.veec561a_dee13
          pipeline-input-step:477.v339683a_8d55e
          pipeline-maven-api:1362.vee39a_d4b_02b_1
          pipeline-maven:1362.vee39a_d4b_02b_1
          pipeline-model-api:2.2151.ve32c9d209a_3f
          pipeline-model-definition:2.2151.ve32c9d209a_3f
          pipeline-model-extensions:2.2151.ve32c9d209a_3f
          pipeline-rest-api:2.34
          pipeline-stage-tags-metadata:2.2151.ve32c9d209a_3f
          pipeline-stage-view:2.34
          pipeline-utility-steps:2.16.0
          plain-credentials:143.v1b_df8b_d3b_e48
          plugin-util-api:3.6.0
          powershell:2.1
          prism-api:1.29.0-10
          resource-disposer:0.23
          role-strategy:689.v731678c3e0eb_
          scm-api:683.vb_16722fb_b_80b_
          script-security:1294.v99333c047434
          simple-theme-plugin:176.v39740c03a_a_f5
          slack:684.v833089650554
          ssh-credentials:308.ve4497b_ccd8f4
          ssh-slaves:2.947.v64ee6b_f87b_c1
          sshd:3.312.v1c601b_c83b_0e
          subversion:2.17.3
          theme-manager:215.vc1ff18d67920
          timestamper:1.26
          token-macro:400.v35420b_922dcb_
          view-job-filters:369.ve0513a_a_f5524
          workflow-aggregator:596.v8c21c963d92d
          workflow-api:1283.v99c10937efcb_
          workflow-basic-steps:1042.ve7b_140c4a_e0c
          workflow-cps:3826.v3b_5707fe44da_
          workflow-durable-task-step:1313.vcb_970b_d2a_fb_3
          workflow-job:1385.vb_58b_86ea_fff1
          workflow-support:865.v43e78cc44e0d
          ws-cleanup:0.45

           

           

          Marc Joseph added a comment - Saw the comment from jonesbusy. Here's the full list of my plugins:   trilead-api:2.133.vfb_8a_7b_9c5dd1 ansicolor:1.0.4 ant:497.v94e7d9fffa_b_9 antisamy-markup-formatter:162.v0e6ec0fcfcf6 apache-httpcomponents-client-4-api:4.5.14-208.v438351942757 artifact-manager-s3:822.vf129d4836c31 atlassian-jira-software-cloud:2.0.11 audit-trail:361.v82cde86c784e aws-credentials:218.v1b_e9466ec5da_ aws-java-sdk:1.12.610-428.v849169a_01b_a_5 bootstrap5-api:5.3.2-3 bouncycastle-api:2.30.1.77-225.v26ea_c9455fd9 branch-api:2.1135.v8de8e7899051 build-monitor-plugin:1.14-745.ve2023a_305f40 build-timeout:1.31 build-user-vars-plugin:1.9 caffeine-api:3.1.8-133.v17b_1ff2e0599 checks-api:2.0.2 cloudbees-disk-usage-simple:187.v6378d330d1d4 cloudbees-folder:6.858.v898218f3609d command-launcher:107.v773860566e2e commons-lang3-api:3.13.0-62.v7d18e55f51e2 commons-text-api:1.11.0-95.v22a_d30ee5d36 config-file-provider:959.vcff671a_4518b_ configuration-as-code:1763.vb_fe9c1b_83f7b copyartifact:722.v0662a_9b_e22a_c credentials-binding:642.v737c34dea_6c2 credentials:1311.vcf0a_900b_37c2 dark-theme:410.v3095e2c26b_17 devops-portal:415.vaf57f86bb4d1 discard-old-build:1.07 display-url-api:2.200.vb_9327d658781 docker-commons:439.va_3cb_0a_6a_fb_29 docker-workflow:572.v950f58993843 dotcoverrunner:1.0.7 dotnet-sdk:1.4.0 durable-task:523.va_a_22cf15d5e0 ec2-fleet:3.2.0 echarts-api:5.4.3-2 elastic-axis:464.va_7ed499b_9d75 email-ext:2.102 embeddable-build-status:459.v428d6761597b_ font-awesome-api:6.5.1-1 git-changelog:3.36 git-client:4.6.0 git:5.2.1 github-api:1.318-461.v7a_c09c9fa_d63 github-branch-source:1767.va_7d01ea_c7256 github-checks:554.vb_ee03a_000f65 github-oauth:597.ve0c3480fcb_d0 github:1.37.3.1 gradle:2.9 inline-pipeline:1.0.3 instance-identity:185.v303dc7c645f9 jackson2-api:2.15.3-372.v309620682326 jacoco:3.3.5 javadoc:243.vb_b_503b_b_45537 javax-mail-api:1.6.2-9 jaxb:2.3.9-1 jdk-tool:73.vddf737284550 jira:3.12 job-dsl:1.87 jobcacher:409.vc3fde9f9b_f30 jobConfigHistory:1229.v3039470161a_d jquery3-api:3.7.1-1 junit:1252.vfc2e5efa_294f last-changes:2.7.11 ldap:711.vb_d1a_491714dc mailer:463.vedf8358e006b_ matrix-auth:3.2.1 matrix-project:822.v01b_8c85d16d2 maven-plugin:3.23 metrics:4.2.18-442.v02e107157925 mina-sshd-api-common:2.11.0-86.v836f585d47fa_ mina-sshd-api-core:2.11.0-86.v836f585d47fa_ monitoring:1.95.0 msbuild:1.30 nodejs:1.6.1 nodelabelparameter:1.12.0 nuget:1.1 nunit:442.v157a_e8448a_d7 octopusdeploy:4.0.0 okhttp-api:4.11.0-157.v6852a_a_fa_ec11 pam-auth:1.10 pipeline-build-step:540.vb_e8849e1a_b_d8 pipeline-giphy-api:2.0.1 pipeline-github:2.8-155.8eab375ac9f8 pipeline-groovy-lib:689.veec561a_dee13 pipeline-input-step:477.v339683a_8d55e pipeline-maven-api:1362.vee39a_d4b_02b_1 pipeline-maven:1362.vee39a_d4b_02b_1 pipeline-model-api:2.2151.ve32c9d209a_3f pipeline-model-definition:2.2151.ve32c9d209a_3f pipeline-model-extensions:2.2151.ve32c9d209a_3f pipeline- rest -api:2.34 pipeline-stage-tags-metadata:2.2151.ve32c9d209a_3f pipeline-stage-view:2.34 pipeline-utility-steps:2.16.0 plain-credentials:143.v1b_df8b_d3b_e48 plugin-util-api:3.6.0 powershell:2.1 prism-api:1.29.0-10 resource-disposer:0.23 role-strategy:689.v731678c3e0eb_ scm-api:683.vb_16722fb_b_80b_ script-security:1294.v99333c047434 simple-theme-plugin:176.v39740c03a_a_f5 slack:684.v833089650554 ssh-credentials:308.ve4497b_ccd8f4 ssh-slaves:2.947.v64ee6b_f87b_c1 sshd:3.312.v1c601b_c83b_0e subversion:2.17.3 theme-manager:215.vc1ff18d67920 timestamper:1.26 token-macro:400.v35420b_922dcb_ view-job-filters:369.ve0513a_a_f5524 workflow-aggregator:596.v8c21c963d92d workflow-api:1283.v99c10937efcb_ workflow-basic-steps:1042.ve7b_140c4a_e0c workflow-cps:3826.v3b_5707fe44da_ workflow-durable-task-step:1313.vcb_970b_d2a_fb_3 workflow-job:1385.vb_58b_86ea_fff1 workflow-support:865.v43e78cc44e0d ws-cleanup:0.45    

          I think the guilty is artifact-manager-s3-plugin. It's not in the bom so problem was not detected.

          Probably it's just matter to bump it's dependencies and perform a release of it

          Valentin Delaye added a comment - I think the guilty is artifact-manager-s3-plugin. It's not in the bom so problem was not detected. Probably it's just matter to bump it's dependencies and perform a release of it

          Valentin Delaye added a comment - - edited

          [INFO] +- org.apache.jclouds.provider:aws-s3:jar:2.5.0:compile
          [INFO] | - org.apache.jclouds.api:s3:jar:2.5.0:compile
          [INFO] | +- org.apache.jclouds.api:sts:jar:2.5.0:compile
          [INFO] | | - org.apache.jclouds:jclouds-core:jar:2.5.0:compile
          [INFO] | | +- com.google.code.gson:gson:jar:2.8.9:compile

          https://github.com/apache/jclouds/pull/176

          https://issues.apache.org/jira/browse/JCLOUDS-1620

          But sadly not released yet

          Valentin Delaye added a comment - - edited [INFO] +- org.apache.jclouds.provider:aws-s3:jar:2.5.0:compile [INFO] | - org.apache.jclouds.api:s3:jar:2.5.0:compile [INFO] | +- org.apache.jclouds.api:sts:jar:2.5.0:compile [INFO] | | - org.apache.jclouds:jclouds-core:jar:2.5.0:compile [INFO] | | +- com.google.code.gson:gson:jar:2.8.9:compile https://github.com/apache/jclouds/pull/176 https://issues.apache.org/jira/browse/JCLOUDS-1620 But sadly not released yet

          I've reassigned the component to artifact-manager-s3-plugin.

          Not sure if anything can be done until jcloud release a new version. (Plugin first class loader ? Shading ?) https://www.jenkins.io/doc/developer/plugin-development/dependencies-and-class-loading/

          Valentin Delaye added a comment - I've reassigned the component to artifact-manager-s3-plugin. Not sure if anything can be done until jcloud release a new version. (Plugin first class loader ? Shading ?) https://www.jenkins.io/doc/developer/plugin-development/dependencies-and-class-loading/

          Basil Crow added a comment -

          Not sure if anything can be done until jcloud release a new version

          pluginFirstClassLoader should work, as should maskClasses (masking the GSON classes from Artifact Manager on S3 so that its own copy is used).

          Basil Crow added a comment - Not sure if anything can be done until jcloud release a new version pluginFirstClassLoader should work, as should maskClasses (masking the GSON classes from Artifact Manager on S3 so that its own copy is used).

          Basil Crow added a comment -

          datariomj Please confirm that the issue is resolved with the following releases:

          artifact-manager-s3 843.v87eb_5414d596
          gson-api 2.10.1-3.vb_25b_599b_e4f8
          trilead-api 2.133.vfb_8a_7b_9c5dd1

          Basil Crow added a comment - datariomj Please confirm that the issue is resolved with the following releases: artifact-manager-s3 843.v87eb_5414d596 gson-api 2.10.1-3.vb_25b_599b_e4f8 trilead-api 2.133.vfb_8a_7b_9c5dd1

          Marc Joseph added a comment -

          Hi Basil,

          Confirming that updating artifact-manager-s3 to 843.v87eb_5414d596 resolved the issue.
          Thanks for the help. 

          Marc Joseph added a comment - Hi Basil, Confirming that updating artifact-manager-s3 to 843.v87eb_5414d596 resolved the issue. Thanks for the help. 

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

              Created:
              Updated:
              Resolved: