I am getting the below warning intermittently while running my java application,

WARNING: All illegal access operations will be denied in a future release WARNING: An illegal reflective access operation has occurred WARNING: Please consider reporting this to the maintainers of com.fasterxml.jackson.databind.util.ClassUtil WARNING: Illegal reflective access by com.fasterxml.jackson.databind.util.ClassUtil (file:/usr/app/my_app.jar) to field java.lang.Throwable.cause 

I think the below line may have connection with this,

private final static ObjectMapper mapper = new ObjectMapper(); AuthInfo authInfo = mapper.readValue(userInfo, AuthInfo.class); 

However I am unable to reproduce this issue in my local even if I try with the same input that production has. I have used --add-opens to ignore these warnings, its working but I want to know why this is happening and how to fix that reflection access warnings.

Tried to use –-illegal-access=debug to get the stack trace but I am getting Used:

java –-illegal-access=debug -jar my_application.jar 

Getting error like,

Error: Could not find or load main class –-illegal-access=debug Caused by: java.lang.ClassNotFoundException: –-illegal-access=debug 

I am using Java 11.0.2

Edit: I am also getting the below warning,

WARNING: Illegal reflective access by com.amazonaws.util.XpathUtils (file:/usr/app/m1x-publish.jar) to method com.sun.org.apache.xpath.internal.XPathContext.getDTMManager() 
4

Related questions 1 Jackson Deserialising :com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 15 NoClassDefFoundError of com/fasterxml/jackson/databind/ObjectMapper with Maven 2 NoSuchMethodError: com.fasterxml.jackson.databind.ObjectMapper.readFor(..) Related questions 1 Jackson Deserialising :com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 15 NoClassDefFoundError of com/fasterxml/jackson/databind/ObjectMapper with Maven 2 NoSuchMethodError: com.fasterxml.jackson.databind.ObjectMapper.readFor(..) 1 resolving com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field 4 2.9.8)">Upgrade of Jackson from org.codehaus.jackson to com.fasterxml.jackson (version 1.9.13 --> 2.9.8) 6 com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No value type configured for ObjectReader 3 fasterxml.jackson.databind Invalid Definition Exception 1 Jackson Object Mapper com.fasterxml.jackson.databind.exc.MismatchedInputException 0 Fasterxml Jackson databind MismatchedInputException 1 UnrecognizedPropertyException in FasterXML Load 7 more related questions Show fewer related questions

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.