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

Dependency convergence error for jakarta.activation:jakarta.activation-api and jakarta.xml.bind:jakarta.xml.bind-api #976

Open
bharatgoyal0208 opened this issue May 10, 2023 · 3 comments

Comments

@bharatgoyal0208
Copy link

Maven build fails due to dependency convergence error.
If I include these dependencies in exclusion category, then the Duplicate Class rule breaks,
Where the duplicate classes are from aopallianace from guice dependency,
and aopalliance-repackaged from org.glassfish.hk2.external.

Attached is the error I get, can someone suggest what can be done.
Thanks.
error.txt

@jmini
Copy link
Collaborator

jmini commented May 10, 2023

I guess if you enforce usage of jakarta.activation:jakarta.activation-api:1.2.1 (instead of 1.2.2) then your issue is solved?

Personally I think gitlab4j-api should not declare a dependency to jakarta.activation:jakarta.activation-api since this is already a dependency of the jersey client we are using.

It seems that with the newest jersey version, there is no dependency on jakarta.activation-api anymore. So the one gitlab4j indicates as dependency will not conflict with anything else.

@bharatgoyal0208
Copy link
Author

I tried enforcing usage of jakarta.activation:jakarta.activation-api:1.2.1, but my hibernate dependency creates a conflict.
I am using maven rule of banning duplicate class in my parent pom. It creates this issue with hibernate, guice - aopalliance etc.
Hibernate also uses this dependency with version 1.2.0, and I can't risk tinkering with hibernate.
You can refer here

Also, I tried using the latest 6.0.0-rc.1 release, which gives me another error:
Required Upper Bound Dependency error.
You can refer here

@jmini
Copy link
Collaborator

jmini commented May 10, 2023

And if you pin the version to of jakarta.activation:jakarta.activation-api to 1.2.0 (the one hibernate is using?). I think gitlab4j-api does not really care about the version. It just need one to avoid the error:

May 10, 2023 1:31:00 PM org.glassfish.jersey.message.internal.MessagingBinders$EnabledProvidersBinder bindToBinder
WARNING: A class javax.activation.DataSource for a default provider MessageBodyWriter<javax.activation.DataSource> was not found. The provider is not available.

6.0.0-rc.1 is a complete different story, because we are using the lib (jersey client and so on) in the version that uses the jackarta.* packages instead of javax.*. This version is intended to be used with Spring 6, Spring Boot 3, Quarkus 3 and all the other frameworks that are using this namespace.

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

2 participants