Error in Jenkins Related to Guice/ErrorInCustomProvider

Jenkins setup:
Hi Team, i have upgraded jenkins to LTS 2.426.3 , also have upgraded most of the plugins & removed deprecated plugins.My jenkins setup is done using kubernetes helm.
When i am executing any Jenkins Job im getting below Error.

2024-02-25 17:52:44.493+0000 [id=13]    WARNING hudson.model.Run#getArtifactsUpTo
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$$6a32794e.GUICE$TRAMPOLINE(<generated>)
        at GsonModule$$FastClassByGuice$$6a32794e.apply(<generated>)


2) [Guice/ErrorInCustomProvider]: NoSuchMethodError: 'void ConstructorConstructor.<init>(Map)'
  at GsonModule.provideGson(GsonModule.java:99)
      \_ installed by: AWSS3HttpApiModule -> GsonModule
  while locating Gson

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$$6a32794e.GUICE$TRAMPOLINE(<generated>)
        at GsonModule$$FastClassByGuice$$6a32794e.apply(<generated>)
        at ProviderMethod$FastClassProviderMethod.doProvision(ProviderMethod.java:260)
        at ProviderMethod.doProvision(ProviderMethod.java:171)
        at InternalProviderInstanceBindingImpl$CyclicFactory.provision(InternalProviderInstanceBindingImpl

3) [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
  at UtilsImpl.<init>(UtilsImpl.java:52)
      \_ for 2nd parameter
  at UtilsImpl.class(UtilsImpl.java:52)
  while locating UtilsImpl
  at ApiContextImpl.<init>(ApiContextImpl.java:48)
      \_ for 4th parameter
  at ApiContextImpl.class(ApiContextImpl.java:48)
  while locating ApiContextImpl<AWSS3Client>
  while locating ApiContext<AWSS3Client>
  at BindProviderMetadataContextAndCredentials.backend(BindProviderMetadataContextAndCredentials.java:84)
  at BlobStoreContextImpl.<init>(BlobStoreContextImpl.java:46)
      \_ for 1st parameter
  at BlobStoreContextImpl.class(BlobStoreContextImpl.java:46)
  while locating BlobStoreContextImpl
  at AWSS3BlobStore.<init>(AWSS3BlobStore.java:70)
      \_ for 1st parameter
  while locating AWSS3BlobStore
  at AWSS3BlobStoreContextModule.configure(AWSS3BlobStoreContextModule.java:32)
  while locating blobstore.S3BlobStore
  at S3BlobStoreContextModule.configure(S3BlobStoreContextModule.java:48)
  while locating BlobStore

Even if i get above error my jenkins is working fine & Jobs are executing.But need to resolve these errors.

Hello @ajayb09 and welcome to this community. :wave:

The error message you’re seeing seems to be related to Guice, a library for dependency injection in Java.
It seems that there’s a problem with the creation of an injector due to a NoSuchMethodError.
This error is thrown when an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.

In your case, the error message seems to indicate that the method ConstructorConstructor.<init>(Map) cannot be found. :person_shrugging:
This method is part of the Gson library, which is a Java library that can be used to convert Java Objects into their JSON representation and vice versa.

I don’t know how to find the dependency tree of all the plugins of your Jenkins instance, but there could be an inconsistency somewhere between a version of Guice and a version of Gson.

At least, that’s what I think I understood. :person_shrugging: