-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Incompatible woodstox-core and stax2-api dependencies #340
Comments
The knock-on effect of a maintenance release of Jackson requiring a new minor release of |
Ouch. Yes, this is unfortunate. Wish I had caught that before. Thank you for reporting this. Unfortunately the way Maven releases work, I am not sure much that can be done to help here. |
Thanks, @cowtowncoder. I discovered this in the context of Spring Boot where we have some dependency management that gives us a chance to adjust the versions without requiring a new release of Jackson. Is downgrading Woodstox to 5.0.x a viable option for use with Alternatively, we could use our dependency management to upgrade |
FYI after upgrading to 2.9.9, my project is now complaining because it's checking transitive dependencies:
@cowtowncoder What about using |
@dadoonet I am not opposed to enforcer plugin, although I thought it was already enabled for Jackson. Further on upgrade: I did not realize (... despite being author of Woodstox :) ) that there was such a jump for |
@wilkinsona Yes, downgrade should be fine as far as I know. Alternatively I would think that upgrade of So. I think that as long as you align |
Thank you, @cowtowncoder, that's very helpful. |
Temporary workaround:
|
I wonder if this is something that actually belongs in |
FWIW, my opinion is that it does not. The bom is for Jackson so it should only manage the versions of Jackson's own modules and not of its dependencies. |
Because of FasterXML/jackson-dataformat-xml#340, we need to explicitly declare `stax2-api:4.1` dependency. Also another non related side effect is that we need to exclude `jackson-module-jaxb-annotations` from `jersey-media-json-jackson`. Related to #734.
Fair enough. It seems like bit of borderline case where it might help, but since use for XML (f.ex) is only from xml format module and JAX-RS xml provider, there isn't that much benefit even if it was added. Same goes for JAXB api. |
@cowtowncoder I'm currently experiencing the same problem given a dependency to This is the resulting dependency graph (gradle):
The dependency to
I don't think your commit 81bcf12 will fix this problem. As the dependency to I think that is the same problem @maksymgendin mentioned here. Excluding Relates to FasterXML/woodstox#46 |
Looking at the comment above from @dpeger, there is an incompatibility. The signature of public static EmptyIterator getInstance() { return sInstance; } To: public static <T> Iterator<T> getInstance() { return (Iterator<T>) sInstance; } This is binary incompatible and may be source incompatible depending on how the result of |
I can see that this is (alas!) binary incompatible, but I do not think it is source-incompatible for any use case (I don't see use case for caller relying on But I am not quite sure why downgrade would necessarily be preferable to upgrade in Jackson components: both combinations (if working with other frameworks) should work, and the problem is only between new-Woodstox/old-stax2 (and possibly vice versa)?
|
Ok. So, the issue was reported for Woodstox itself: and so the problem is specific to Woodstox version |
@cowtowncoder as you didn't change anything other than removing the dependency to This would be our workaround for this issue until 2.9.10 is released. |
@dpeger Yes, I think so. I wish I had paid more attention to version alignment since there is now the problem of XML format module and JAX-RS provider. It is possible that this problem, along with 2 CVEs, may mean that I'll do 2.9.10 instead of micro-patches; at point where 3 components (well, with JAX-RS being sub-modules, more) need new versions might as well do full release. |
@dadoonet FYI, |
2.9.9 upgraded to
woodstox-core
5.1 which depends onstax2-api
4.1 but it still depends directly onstax2-api
3.1.4. As a result, when using Maven, a dependency onjackson-dataformat-xml
results in an incompatible combination of versions ofwoodstox-core
andstax2-api
and aNoSuchMethodError
results when also using Hibernate:The text was updated successfully, but these errors were encountered: