Skip to content
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

Stop using illegal reflective access #23

Closed
mustafashabib opened this issue Jan 6, 2019 · 13 comments
Closed

Stop using illegal reflective access #23

mustafashabib opened this issue Jan 6, 2019 · 13 comments
Labels

Comments

@mustafashabib
Copy link

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
Copy link
Member

Hi @mustafashabib ,

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

@mvmn
Copy link

mvmn commented May 14, 2019

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

@reda-alaoui
Copy link
Member

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

@reda-alaoui
Copy link
Member

The reference to the Spring Data JPA PR => spring-projects/spring-data-jpa#305

@reda-alaoui
Copy link
Member

reda-alaoui commented May 17, 2019

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

@reda-alaoui
Copy link
Member

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

@reda-alaoui
Copy link
Member

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

@jplumez
Copy link

jplumez commented Nov 11, 2019

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
Copy link
Member

reda-alaoui commented Nov 11, 2019

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 spring-projects/spring-data-jpa#305.

@reda-alaoui
Copy link
Member

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

@idkw
Copy link

idkw commented Dec 10, 2019

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

@reda-alaoui reda-alaoui changed the title Illegal Access Operations during Gradle builds Stop using illegal reflective access Jan 13, 2020
@reda-alaoui
Copy link
Member

reda-alaoui commented Jan 13, 2020

spring-projects/spring-data-jpa#305 was merged ! 🍾

The first Spring Data JPA version to contain spring-projects/spring-data-jpa#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 reda-alaoui pinned this issue Apr 11, 2020
@reda-alaoui
Copy link
Member

reda-alaoui commented May 13, 2020

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

  • upgrading to Spring Data JPA 2.3.0.RELEASE

and

  • upgrading to Spring Data JPA EntityGraph 2.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants