Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

The plugin uses an incompatible version of the library used by other plugins #7

Closed
kuisathaverat opened this issue Dec 20, 2023 · 4 comments
Labels
bug For changelog: Minor bug. Will be listed after features

Comments

@kuisathaverat
Copy link

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

Any

Reproduction steps

install and configure artifact-manager-s3 and install the gson-api-plugin

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 

Expected Results

do not cause conflits

Actual Results

cause conflits

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 

Anything else?

No response

Are you interested in contributing a fix?

No response

@kuisathaverat kuisathaverat added the bug For changelog: Minor bug. Will be listed after features label Dec 20, 2023
@jonesbusy
Copy link
Contributor

Please provide full list of plugin and their version

@datariomj
Copy link

Please provide full list of plugin and their version

Hi here's the full list of plugins on my jenkins server

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

@jonesbusy
Copy link
Contributor

The guilty is https://github.com/jenkinsci/artifact-manager-s3-plugin and specially it's dependency on jcloud which bundle an old version of gson.

Version was updated on apache/jclouds#176 but still not available for release.

I'm closing this issue because not related on gson-api-plugin which only bundle the library

After fixing it on artifact-manager-s3 I suggest it's added on https://github.com/jenkinsci/bom to prevent similar issues in the future

@jonesbusy
Copy link
Contributor

Follow-up on https://issues.jenkins.io/browse/JENKINS-72441 which correct component

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug For changelog: Minor bug. Will be listed after features
Projects
None yet
Development

No branches or pull requests

3 participants