-
Notifications
You must be signed in to change notification settings - Fork 29
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
Illegal Access Warning #19
Comments
Hey, Also using this nice library, As stated in the javadoc, https://github.com/bolcom/spring-data-mongodb-encrypt/blob/a9d5ee0dfc5d84dda0dac99a8922982de739b647/src/main/java/com/bol/util/JCEPolicy.java#L13, the hack is not required anymore... starting from specific JDK builds! I guess the lib wants to be compatible with versions prior to the fix. A good enough fix to avoid such error message (which is even bigger with a stacktrace using Java 12), would be to check the java runtime version before performing the hack... which would be kinda cumbersome though. Otherwise, get rid of the hack and bump the version of the lib... Food for thoughts. |
Correct, java 8u152 enabled strong encryptions in JCEPolicy, so this hack is no longer needed, that's exactly why it's enclosed in a try-catch. |
Well tested your lib with openjdk11 and at the moment there are no major issues. |
Thank you. I am considering adding a java version check and only do the JCEPolicy hack on java <= 8u152, as this hack is bound to produce JVM warnings and errors. |
Hello! Is this warn still open? |
Yes, I'm planning to add a java version check before this one, but it's relatively low priority as this is merely cosmetic - apart from that log line, everything works as normal. |
ok ok, i will try to solve, if i have time! |
Fixed in 2.3.1. |
Thank you! |
I am facing the same issue as you, while migrating to JDK15 . The current spring-data-mongodb-encrypt version in my application is 1.3.0. could you please let me know how you resolved this issue |
It is not an issue. For older versions of java8, the encryption API was not fully open out of the box, and a hack needed to be applied. This error message simply states this hack didn't work. As in, you can safely ignore this warning. |
Hi,
thank you much for this great extension, i got this warning, what to do about that?
I am using Spring Boot with version: v2.1.2.RELEASE
The text was updated successfully, but these errors were encountered: