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

Please update jaxb dependency to 3.0.0 #128

Closed
robseidel opened this issue Mar 10, 2021 · 5 comments
Closed

Please update jaxb dependency to 3.0.0 #128

robseidel opened this issue Mar 10, 2021 · 5 comments

Comments

@robseidel
Copy link

version.jaxb.impl in jackson-modules-base/jaxb/pom.xml points to version 2.3.3 and not to the newest version (3.0.0).

The old implementation use some package names it shouldn't, causing conflicts with other dependencies.

@cowtowncoder
Copy link
Member

TL;DNR; I think #116 does what you want.

@robseidel is that the version that completely changes API implemented (javax->jakarta), and in general will break every existing dependency if it was changed?
(part of big breaking "j2ee to jakarta" upgrade Oracle is hoping to complete, talked about here https://blogs.oracle.com/javamagazine/transition-from-java-ee-to-jakarta-ee for example)

If so, simply changing the dependency would absolutely not work: it would likely break all existing users. However, there is a possible solution via #116 in which alternative jar has been published since 2.12.0, with classifier "jakarta", and which has been post-processed to implement the new API (despite conceptually being replacement, jakarta APIs are not related in any way as far as Maven can see: different packages means different classes for class loader).

@robseidel
Copy link
Author

robseidel commented Mar 11, 2021

Problem is, that 2.3 introduced breaking changes to the old packages and classes, which shouldn't have been done in the first place. It was corrected by changing the package with 3.0.
So it would be better to depend on either 2.2 or >3.0, not on the broken 2.3.
And the class loader is exactly the problem I run into, when using jackson-module-jaxb-annotations > 2.9.8. Cause the changed classes result in conflicts, because other artifacts include the old sun classes too, like metro (glassfish).

I have looked at the pr and at the artifact here - https://repo1.maven.org/maven2/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.12.2/jackson-module-jaxb-annotations-2.12.2-jakarta.jar.
It doesn't help, the pom depends still on jakarta.xml.bind-api:2.3.2 (also the pom in the jar points at that version).
Guess a separate classifier is not enough...

@cowtowncoder
Copy link
Member

@robseidel Can you elaborate on breakage wrt 2.3? I am not familiar with issues here so I can't really comment on that without understanding what kind of breakage you are talking about
(my initial guess wrt jaxb/jakarta difference was incorrect)

I am especially puzzled by 2.3.2 dependency being problematic since that has been the dependency for quite a long time here and isn't something that changed lately? (nor reported by others)

@robseidel
Copy link
Author

jakartaee/jaxb-api@e7b5f04

This is the only breaking change I can find. But the metro version, I use (webservices-api:2.4.3) includes this change too. So it cannot cause conflicts. I can't specify why I got problem in the past with this.

Metro is now also released in version 3.0.0, so I will move on to use the the new jakarta packages in the future, so the artifacts cannot interfere.

Sorry for the trouble. I think this can be closed.

@cowtowncoder
Copy link
Member

Ok. Let me know if there are further issues; the whole jakarta/javax situation is a bit problematic from my perspective (esp. on OSGi side it seems).

On dependency, please note that you can also override jaxb api dependency that this module indicates.

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