You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have developed an application on Java 8 using the AWS SDK (pom has version 2.18.19 for the software.amazon.awssdkbom). It is then deployed on Windows and Linux systems that run Java 8, 11, etc. Recently, a change in how the AWS SDK is being used in my code (new feature, etc.) has caused the following exception:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.dom4j.io.SAXContentHandler (file:/opt/tstool-14.9.3/bin/dom4j-1.6.1.jar) to method com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser$LocatorProxy.getEncoding()
WARNING: Please consider reporting this to the maintainers of org.dom4j.io.SAXContentHandler
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
Expected Behavior
The parsing of JSON web service responses should work with no problems.
Current Behavior
The illegal reflective access error is generated, which prevents the AWS SDK from working correctly.
Reproduction Steps
I'm not sure of the exact trigger, but I am using the S3 and CloudFront AWS APIs. It works fine on Java 8 with dom4j-1.6.1 but running on Java 11 causes the problem.
Possible Solution
I do not know exactly what is triggering this issue, but internet research indicates that the fix is to use dom4j-2.1.4.jar (or similar), which supports Java 11. I have not tried running on Java versions newer than 11. I downloaded the dom4j-2.1.4.jar file from Maven Central and replaced the 1.6.1 version that Maven includes in the installation. This fixed the problem so I am moving on. I'll try to figure out if I can modify the pom to use the newer version of the file and override what AWS SDK pulls in. If the AWS SDK pom dependency is updated then I won't have to do the work-around.
Additional Information/Context
The software that I am using is complex so it is difficult to provide a snippet. See the AWS plugin code.
AWS Java SDK version used
2.18.19
JDK version used
OpenJDK 8 and 11
Operating System and version
Windows (latest) and Linux Debian Bullseye.
The text was updated successfully, but these errors were encountered:
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
Describe the bug
I have developed an application on Java 8 using the AWS SDK (
pom
has version 2.18.19 for thesoftware.amazon.awssdk
bom
). It is then deployed on Windows and Linux systems that run Java 8, 11, etc. Recently, a change in how the AWS SDK is being used in my code (new feature, etc.) has caused the following exception:Expected Behavior
The parsing of JSON web service responses should work with no problems.
Current Behavior
The illegal reflective access error is generated, which prevents the AWS SDK from working correctly.
Reproduction Steps
I'm not sure of the exact trigger, but I am using the S3 and CloudFront AWS APIs. It works fine on Java 8 with
dom4j-1.6.1
but running on Java 11 causes the problem.Possible Solution
I do not know exactly what is triggering this issue, but internet research indicates that the fix is to use
dom4j-2.1.4.jar
(or similar), which supports Java 11. I have not tried running on Java versions newer than 11. I downloaded thedom4j-2.1.4.jar
file from Maven Central and replaced the 1.6.1 version that Maven includes in the installation. This fixed the problem so I am moving on. I'll try to figure out if I can modify thepom
to use the newer version of the file and override what AWS SDK pulls in. If the AWS SDK pom dependency is updated then I won't have to do the work-around.Additional Information/Context
The software that I am using is complex so it is difficult to provide a snippet. See the AWS plugin code.
AWS Java SDK version used
2.18.19
JDK version used
OpenJDK 8 and 11
Operating System and version
Windows (latest) and Linux Debian Bullseye.
The text was updated successfully, but these errors were encountered: