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

Jackson dependencies issue #2789

Closed
loicmathieu opened this issue Jun 11, 2019 · 14 comments · Fixed by #2791
Closed

Jackson dependencies issue #2789

loicmathieu opened this issue Jun 11, 2019 · 14 comments · Fixed by #2791
Labels
kind/bug Something isn't working
Milestone

Comments

@loicmathieu
Copy link
Contributor

Describe the bug
Jackson dependency is 2.9.9 in the Quarkus bom but some dependency issue exist linked to smallrye-openapi that downgrade the dependency version to 2.9.8.
Unfortunatly there is an existing CVE on the 2.9.8 so it's important to have the 2.9.9 version.
Moreover, there is a mix of the two versions for different Jackson modules.

Expected behavior
All Jackson libraries should be of the 2.9.9 version.

Actual behavior
Making a dependency tree shows some Jackson libraries on version 2.9.8 despite the Quarkus bom references the 2.9.9 only:

[INFO] --- maven-dependency-plugin:3.1.1:tree (default-cli) @ quarkus-smallrye-openapi ---
[INFO] io.quarkus:quarkus-smallrye-openapi:jar:999-SNAPSHOT
[INFO] +- io.smallrye:smallrye-open-api:jar:1.1.3:compile
[INFO] |  +- org.eclipse.microprofile.openapi:microprofile-openapi-api:jar:1.1.2:compile
[INFO] |  |  \- org.osgi:org.osgi.annotation.versioning:jar:1.0.0:compile
[INFO] |  +- org.eclipse.microprofile.config:microprofile-config-api:jar:1.3:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.8:compile
[INFO] |  |  \- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.8:compile
[INFO] |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.9.9:compile
[INFO] |  |  \- org.yaml:snakeyaml:jar:1.23:compile
[INFO] |  +- org.jboss:jandex:jar:2.1.1.Final:compile
[INFO] |  +- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] |  +- org.jboss.shrinkwrap:shrinkwrap-api:jar:1.2.6:compile
[INFO] |  \- commons-beanutils:commons-beanutils:jar:1.9.3:compile
[INFO] |     +- commons-logging:commons-logging:jar:1.2:compile
[INFO] |     \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] +- io.quarkus:quarkus-core:jar:999-SNAPSHOT:compile
[INFO] |  +- javax.inject:javax.inject:jar:1:compile
[INFO] |  +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] |  +- io.smallrye:smallrye-config:jar:1.3.5:compile
[INFO] |  |  \- javax.enterprise:cdi-api:jar:2.0.SP1:compile
[INFO] |  |     +- javax.el:javax.el-api:jar:3.0.0:compile
[INFO] |  |     \- javax.interceptor:javax.interceptor-api:jar:1.2:compile
[INFO] |  +- org.jboss.logmanager:jboss-logmanager-embedded:jar:1.0.3:compile
[INFO] |  +- org.jboss.logging:jboss-logging-annotations:jar:2.1.0.Final:compile
[INFO] |  +- org.jboss.threads:jboss-threads:jar:3.0.0.Beta4:compile
[INFO] |  +- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] |  +- org.jboss.slf4j:slf4j-jboss-logging:jar:1.1.0.Final:compile
[INFO] |  +- org.graalvm.sdk:graal-sdk:jar:1.0.0-rc16:compile
[INFO] |  +- org.wildfly.common:wildfly-common:jar:1.5.0.Final-format-001:compile
[INFO] |  +- org.wildfly.security:wildfly-elytron-ssl:jar:2.0.0.Alpha4:compile
[INFO] |  |  +- org.wildfly.security:wildfly-elytron-auth-server:jar:2.0.0.Alpha4:compile
[INFO] |  |  |  \- org.wildfly.security:wildfly-elytron-permission:jar:2.0.0.Alpha4:compile
[INFO] |  |  +- org.wildfly.security:wildfly-elytron-base:jar:2.0.0.Alpha4:compile
[INFO] |  |  +- org.wildfly.security:wildfly-elytron-credential:jar:2.0.0.Alpha4:compile
[INFO] |  |  |  +- org.wildfly.security:wildfly-elytron-keystore:jar:2.0.0.Alpha4:compile
[INFO] |  |  |  \- org.wildfly.security:wildfly-elytron-provider-util:jar:2.0.0.Alpha4:compile
[INFO] |  |  +- org.wildfly.security:wildfly-elytron-auth:jar:2.0.0.Alpha4:compile
[INFO] |  |  +- org.wildfly.security:wildfly-elytron-util:jar:2.0.0.Alpha4:compile
[INFO] |  |  \- org.wildfly.security:wildfly-elytron-x500:jar:2.0.0.Alpha4:compile
[INFO] |  \- org.wildfly.security:wildfly-elytron-x500-cert:jar:2.0.0.Alpha4:compile
[INFO] |     +- org.wildfly.security:wildfly-elytron-asn1:jar:2.0.0.Alpha4:compile
[INFO] |     \- org.wildfly.security:wildfly-elytron-x500-cert-util:jar:2.0.0.Alpha4:compile
[INFO] +- io.quarkus:quarkus-undertow:jar:999-SNAPSHOT:compile
[INFO] |  +- io.undertow:undertow-servlet:jar:2.0.19.Final:compile
[INFO] |  |  +- io.undertow:undertow-core:jar:2.0.19.Final:compile
[INFO] |  |  \- org.jboss.spec.javax.servlet:jboss-servlet-api_4.0_spec:jar:1.0.0.Final:compile
[INFO] |  +- org.jboss.xnio:xnio-nio:jar:3.7.1.Final:compile
[INFO] |  \- org.jboss.xnio:xnio-api:jar:3.7.1.Final:compile
[INFO] +- io.quarkus:quarkus-arc:jar:999-SNAPSHOT:compile
[INFO] |  +- io.quarkus.arc:arc:jar:999-SNAPSHOT:compile
[INFO] |  \- org.eclipse.microprofile.context-propagation:microprofile-context-propagation-api:jar:1.0-RC1:compile
[INFO] +- io.quarkus:quarkus-swagger-ui:jar:999-SNAPSHOT:compile
[INFO] \- com.fasterxml.jackson.core:jackson-core:jar:2.9.8:compile

The wrong version comes from transitive dependency issues from sallrye-openapi

To Reproduce
Steps to reproduce the behavior:

  1. Make a mvn dependency:tree on the quarkus-smallrye-openapi extention

Environment (please complete the following information):

  • Quarkus version or git rev: 0.16.1 and the current master

Additional context
I have a PR ready to fix the dependency issue on the quarkus-smallrye-openapi dependency.

@gsmet
Copy link
Member

gsmet commented Jun 11, 2019

I'm wondering if we should include the jackson-bom to fix the issue.

Having mixed Jackson dependencies will cause a lot of problems.

@aloubyansky we discussed a bit the cost of adding new BOMs, I think this one is worth it considering how popular Jackson is, how incompatible versions are and how many security issues there are with Jackson.

@aloubyansky
Copy link
Member

We already import Jackson BOM.

@gsmet
Copy link
Member

gsmet commented Jun 11, 2019

Ah yes, right. So how come we can have 2.9.8 Jackson dependencies?

@aloubyansky
Copy link
Member

Something is not right with quarkus-bom it seems.

@loicmathieu
Copy link
Contributor Author

@gsmet see my explaination on the PR #2791 , the Quarkus bom is not imported in the exention and we need to force in the extention own dependencyManagement version ...

@aloubyansky
Copy link
Member

Does importing quarkus-bom in the extension fix it for you @loicmathieu ?

@loicmathieu
Copy link
Contributor Author

See my last comment on the PR #2791 that try to summerize it ... unfortunatly it didn't fix the issue so my PR is the best that I can find to fix it (or a derivative version that I explain in it) ... I know it's ugly ...

@aloubyansky
Copy link
Member

Ok, I read your PR comments. Thanks.

@aloubyansky
Copy link
Member

Hold on though. I want to try something.

@aloubyansky
Copy link
Member

The order of importing BOMs is significant. It appears that the reaseasy-bom includes jackson artifacts and is imported before the jackson-bom. If you import the jackson-bom first, you'll get the expected jackson versions all over.

@loicmathieu
Copy link
Contributor Author

@aloubyansky I miss this one! Did I change my PR or do you want to create one yourself ?

@kenfinnigan
Copy link
Member

Yes, first BOM to define a dependency wins

@aloubyansky
Copy link
Member

Could you please adjust your PR to do that @loicmathieu? Thanks a lot for reporting the issue.

@loicmathieu
Copy link
Contributor Author

OK, I'll update my PR

loicmathieu added a commit to loicmathieu/quarkus that referenced this issue Jun 11, 2019
The oder of import in the bom is important, we need to import Jackson first before RESTEasy.
After this, exluding and importing Jackson in the quarkus-smallrye-openapi extention is useless.
loicmathieu added a commit to loicmathieu/quarkus that referenced this issue Jun 11, 2019
The oder of import in the bom is important, we need to import Jackson first before RESTEasy.
After this, exluding and importing Jackson in the quarkus-smallrye-openapi extention is useless.
@gsmet gsmet added this to the 0.17.0 milestone Jun 12, 2019
loicmathieu added a commit to loicmathieu/quarkus that referenced this issue Jun 12, 2019
The oder of import in the bom is important, we need to import Jackson first before RESTEasy.
After this, exluding and importing Jackson in the quarkus-smallrye-openapi extention is useless.
mswiderski pushed a commit to mswiderski/quarkus that referenced this issue Jun 13, 2019
The oder of import in the bom is important, we need to import Jackson first before RESTEasy.
After this, exluding and importing Jackson in the quarkus-smallrye-openapi extention is useless.
patriot1burke added a commit to patriot1burke/quarkus that referenced this issue Jun 14, 2019
root path

docs

fix imports

fix poms and typos

doc suggestions

Add mp rest-client tck configuration

Introduce handling for mp/uri in accordance to spec

Fixes: quarkusio#2795

Remove misleading sentence from Kubernetes / ap4k guide

The guide will updated when dekorateio/dekorate#227
is implemented and the new version included into Quarkus

Implement mock mailer by default on dev/test

fix(quarkusio#2789): fix Jackson version issue

The oder of import in the bom is important, we need to import Jackson first before RESTEasy.
After this, exluding and importing Jackson in the quarkus-smallrye-openapi extention is useless.

Arc - correct circular dependency check to detect self-injection as well, added test.

feat(openapi): Allows OpenAPI path to contain segments e.g /api/openapi/

Fixes quarkusio#2756

Arc - Implement inheritance of scopes for beans.

register reflective classes from bean archive index by providing the index as part of the reflective class build item

Document InjectionPointTransformer.

Arc - register certain CDI components under BuildContext so extensions can use that.
Modify SpringDIProcessor to make use of this.

Subclasses/client proxies - skip delegation if not constructed yet

- resolves quarkusio#2774

Docs - CDI guide - remove unnecessary dummy constructor

feat(agroal): Adds a configuration option to enable datasource metrics

Fixes quarkusio#2820

Quarkus bypasses Nexus and downloads artefacts directly from maven central

Fix title levels in Undertow reference guide

Remove two ArC injection warnings

Update to smallrye-jwt-1.1

Moved common stuff to panache-common-deployment, ported `@GenerateBridge` to non-rx panache

Added two finals

Skip racey TCK test

This is due to eclipse/microprofile-rest-client#203

Undertow 2.0.21.Final

Better error reporting if test resource fails to start

Remove license headers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants