-
Notifications
You must be signed in to change notification settings - Fork 686
AbstractMappingContext not compatible with JDK 17 anymore and violates open JDK security policy. #2845
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
Comments
This is a duplicate of #2844. Spring Data 2.x is compatible with newer Java runtimes. Spring Data 3.x uses Java 17 as baseline. Please note that Spring Data doesn't distinguish between encapsulated and open types. If you choose to use a non-simple type that is encapsulated (e.g. Alternatively, you must provide a If you feel there's more we can do, then let us know about the details. |
@mp911de Hi Mark, thank you for your reply. If there is a way for me to write a custom Converter to overcome this issue, I would appreciate using it. I've tried following code snippet, didn't helped:
Is that Converter that you suggesting, is needed for JPA or noSQL? What I see issue is happening with Spring Data support for noSQL like MongoDB, CosmosDB.
|
Converters aren't beans, converters need to be registered through Spring Data MongoDB has its own |
The latest Java guideline mandates that the library should not use the reflection of setAccessible(true) on java., sun., com.sun.* package and this is what is done by AbstractMappingContext, which violates security guidelines and makes Spring Data legacy framework not compatible with JDK 17 anymore.
You can see more about that on the official java page.
https://docs.oracle.com/en/java/javase/17/migrate/migrating-jdk-8-later-jdk-releases.html#GUID-12F945EB-71D6-46AF-8C3D-D354FD0B1781
Any chance that Spring Data become compatible with a later version of JDK starting with JDK 9 and so?
The text was updated successfully, but these errors were encountered: