Cosium / spring-data-jpa-entity-graph

Spring Data JPA extension allowing full dynamic usage of EntityGraph on repositories
MIT License
469 stars 52 forks source link

Stop using illegal reflective access #23

Closed mustafashabib closed 4 years ago

mustafashabib commented 5 years ago

Hi All

We're on gradle 5.1 and are seeing this message during builds using spring-data-jpa-entity-graph v2.07.


WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.cosium.spring.data.jpa.entity.graph.repository.support.EntityGraphJpaRepositoryFactory (file:[TRUNCATED]/caches/modules-2/files-2.1/com.cosium.spring.data/spring-data-jpa-entity-graph/2.0.7/397ec4ad1ccef66f9ac5aab08034d837dd3b1067/spring-data-jpa-entity-graph-2.0.7.jar) to field java.lang.reflect.Field.modifiers
WARNING: Please consider reporting this to the maintainers of com.cosium.spring.data.jpa.entity.graph.repository.support.EntityGraphJpaRepositoryFactory
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

Just wanted to report it in case it's useful.

reda-alaoui commented 5 years ago

Hi @mustafashabib ,

Thanks for the bug report. I hope to fix this issue once https://jira.spring.io/browse/DATAJPA-1497 is fixed.

mvmn commented 5 years ago

BTW - some of the tests seem to be failing for your PR there, and also it seems to have merge conflicts now.

reda-alaoui commented 5 years ago

Yes I saw that, I will fix it asap ;)

reda-alaoui commented 5 years ago

The reference to the Spring Data JPA PR => https://github.com/spring-projects/spring-data-jpa/pull/305

reda-alaoui commented 5 years ago

Merge conflict fixed. Waiting to see if the build turns to green.

reda-alaoui commented 5 years ago

Looks like they removed the build step from their PRs. Just have to wait for review now.

reda-alaoui commented 4 years ago

The PR was rejected => https://jira.spring.io/browse/DATAJPA-1497

jplumez commented 4 years ago

Hello @reda-alaoui

Any update about the rejected PR ? Will you try to convince them to accept it, or is there any workaround (except disabling illegal access) ?

I have been using your library for a few months and I really like it, it fits my needs perfectly :-) but if the support will stop with Java 12, I should unfortunately reconsider it for some of our projects :(

Thanks in advance !

reda-alaoui commented 4 years ago

Hello @jplumez ,

I am planning to retry convincing them. But I think the more we are, greater are the chances to convince them. So I hope you will let a comment on https://jira.spring.io/browse/DATAJPA-1497 or on https://github.com/spring-projects/spring-data-jpa/pull/305.

reda-alaoui commented 4 years ago

FYI, meanwhile, I think you can still permit illegal access with --illegal-access=permit, even with JDK 12.

idkw commented 4 years ago

I have commented on the spring issue to add more support from users :)

reda-alaoui commented 4 years ago

https://github.com/spring-projects/spring-data-jpa/pull/305 was merged ! :champagne:

The first Spring Data JPA version to contain https://github.com/spring-projects/spring-data-jpa/pull/305 fix will be 2.3.0. Therefore the current issue fix will be available starting with spring-data-jpa-entity-graph 2.3.0.

reda-alaoui commented 4 years ago

Spring Data JPA 2.3.0.RELEASE is now available. You can now fix the issue by:

and