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

Warning "fasterxml.Jackson.DataBind" JDK 11 #29

Open
santannaf opened this issue Apr 1, 2020 · 2 comments
Open

Warning "fasterxml.Jackson.DataBind" JDK 11 #29

santannaf opened this issue Apr 1, 2020 · 2 comments

Comments

@santannaf
Copy link

Hello, I am using your lib, I have Java 11 and whenever I install my Sprint Boot 2.1.13 application it gives a "WARNING" which is this one:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.fasterxml.jackson.databind.util.ClassUtil (file:/C:/Users/santanth/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.10.3/jackson-databind-2.9.10.3.jar) to field java.lang.Throwable.cause
WARNING: Please consider reporting this to the maintainers of com.fasterxml.jackson.databind.util.ClassUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

So do you know any way to resolve this "Warning" that is from Jackson. I think that in some code of your lib you do serialization / deserialization and ends up in conflict with JDK 11. I saw that this "WARNING", is present in the versions of JDK 9+. Thank you very much in advance.

@pierredavidbelanger
Copy link
Owner

I know newer java versions (with module awareness) can be a pain when using reflection, like jackson does.

But since this project does not directly depends on jackson (seems to be com.amazonaws:aws-java-sdk-core, see dependency:tree bellow), I suggest you ask AWS, or better, like the warning suggest, report this to the maintainers of jackson.

I do not know how to fix this one quickly.

$ mvn dependency:tree -Dverbose
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------< ca.pjer:logback-awslogs-appender >------------------
[INFO] Building Logback AWSLogs appender 1.3.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ logback-awslogs-appender ---
[INFO] ca.pjer:logback-awslogs-appender:jar:1.3.0
[INFO] +- ch.qos.logback:logback-classic:jar:1.1.7:compile
[INFO] |  +- ch.qos.logback:logback-core:jar:1.1.7:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.20:compile
[INFO] +- com.amazonaws:aws-java-sdk-logs:jar:1.11.423:compile
[INFO] |  +- com.amazonaws:aws-java-sdk-core:jar:1.11.423:compile
[INFO] |  |  +- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] |  |  +- org.apache.httpcomponents:httpclient:jar:4.5.5:compile
[INFO] |  |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.9:compile
[INFO] |  |  |  +- (commons-logging:commons-logging:jar:1.2:compile - omitted for conflict with 1.1.3)
[INFO] |  |  |  \- commons-codec:commons-codec:jar:1.10:compile
[INFO] |  |  +- software.amazon.ion:ion-java:jar:1.0.2:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.6.7.1:compile
[INFO] |  |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.6.0:compile
[INFO] |  |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.6.7:compile
[INFO] |  |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.6.7:compile
[INFO] |  |  |  \- (com.fasterxml.jackson.core:jackson-core:jar:2.6.7:compile - omitted for duplicate)
[INFO] |  |  \- joda-time:joda-time:jar:2.8.1:compile
[INFO] |  \- com.amazonaws:jmespath-java:jar:1.11.423:compile
[INFO] |     \- (com.fasterxml.jackson.core:jackson-databind:jar:2.6.7.1:compile - omitted for duplicate)
[INFO] +- junit:junit:jar:4.12:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] \- org.mockito:mockito-core:jar:2.2.17:test
[INFO]    +- net.bytebuddy:byte-buddy:jar:1.5.4:test
[INFO]    +- net.bytebuddy:byte-buddy-agent:jar:1.5.3:test
[INFO]    \- org.objenesis:objenesis:jar:2.4:test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.762 s
[INFO] Finished at: 2020-04-01T19:35:34-04:00
[INFO] ------------------------------------------------------------------------

@dnovitski
Copy link
Contributor

Since the upgrade to AWS SDK v2, this should not be an issue anymore. @santannaf Can you confirm?

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

3 participants