-
Notifications
You must be signed in to change notification settings - Fork 76
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 reflective access by org.simpleflatmapper.reflect.ObjectGetterFactory #734
Comments
I’ll have a look, are you using the jdk9 build or the regular one? |
Just saw your reply. My local env/build process is using AdoptOpenJDK 11. The service is deployed as a docker container and it uses "openjdk:11-jre" Running
|
Sorry to bother, any recommendations on how to avoid this or the associated risk? |
I'm trying to reproduce, but gcal and serialVersionUID are static fields so it would not do anything about them. the warning is triggered as far as I can tell when call setAccessible(true) on the Field. so if it works with --illegal-access=deny which sfm should be able to, then there is no risk. could you also try running with --illegal-access=deny and put a breakpoint on java.lang.reflect.InaccessibleObjectException |
I also have the same issue and also was wondering if this was a real issue and if this would be resolved shortly:
My Data Objects were generated by Lombok:
The RowMapper used:
The version of spring-boot used:
The version of sfm: Warning messages I get without the
Error messages I get with the
etc. I hope this helps! |
Same issue
|
Hi,
I'm using SFM v8.2.3 with Spring JDBC and JDK 11, and I've started to see these "Illegal reflective access" warnings. Any recommendations? I believe this SFM version is the latest and is the appropriate version for JDK 11 accordning to the documentation. Am I missing something?
I'm only aware of special handling configured for UUID columns for read mappers. I don't think we're doing anything special or out of the box for handling date columns, I'd have to verify.
Example:
private final RowMapper<MyClass> rowMapper = JdbcTemplateMapperFactory.newInstance() .addGetterForType(UUID.class, (rs, index) -> UUIDUtils.getUUIDFromByteArray(rs.getBytes(index))) .newRowMapper(MyClass.class);
Warnings:
The text was updated successfully, but these errors were encountered: