Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

v3.1.0 fails to startup in Spring 2.7.0, even when using the -all classifier and shaded jars #380

Open
rsheldon-ansira opened this issue Apr 11, 2023 · 0 comments

Comments

@rsheldon-ansira
Copy link

I am trying to upgrade from bitbucket-rest 2.6.2 to 3.1.0, I'm using spring-boot 2.7.9

<dependency> <groupId>io.github.cdancy</groupId> <artifactId>bitbucket-rest</artifactId> <version>3.1.0</version> <classifier>all</classifier> </dependency>

But when I start my application I'm getting the following error:
`1) [Guice/ErrorInCustomProvider]: NoSuchMethodError: 'void ConstructorConstructor.(Map)'
at GsonModule.provideGson(GsonModule.java:99)
_ installed by: BitbucketHttpApiModule -> GsonModule
at GsonWrapper.(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.(Map)'
at GsonModule.provideGson(GsonModule.java:130)
at GsonModule$$FastClassByGuice$$1802571.GUICE$TRAMPOLINE()
at GsonModule$$FastClassByGuice$$1802571.apply()
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.buildApi(ContextBuilder.java:651)
at ContextBuilder.buildApi(ContextBuilder.java:643)
at BitbucketClient.createApi(BitbucketClient.java:87)
at BitbucketClient.(BitbucketClient.java:71)
at BitbucketClient$Builder.build(BitbucketClient.java:222)`

I believe this is related to https://issues.apache.org/jira/browse/JCLOUDS-1618. I did see #194, but I am using the "all" classifier, but it did not work in my case.

What I also find interesting is that when I use the "all" classifier, I still get transitive dependencies, which doesn't seem right given that you're shading all these dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant