question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Illegal reflective access

See original GitHub issue

I’ve a sample project using Spring Boot and Retrofit

I’m using: Spring boot 2.2.5.RELEASE Retrofit 2.8.0 OkHttp 4.4.1 Kotlin 1.3.61 Jdk 11

Retrofit fails to make any request and i receive this warning in the logs:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by retrofit2.Platform (file:/Users/mersan/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/retrofit/2.8.0/53fa357bd7538d2c4872bddf33654f113cf6652b/retrofit-2.8.0.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of retrofit2.Platform
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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:19
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

16reactions
marlonlomcommented, Jun 11, 2021

Greetings,

This is a related issue.

I’m using:

  • Android Studio 4.2
  • Retrofit 2.9.0
  • Kotlin 1.5.10
  • Jdk 1.8.0_292
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by retrofit2.Platform (file:/home/marlonlom/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/retrofit/2.9.0/d8fdfbd5da952141a665a403348b74538efc05ff/retrofit-2.9.0.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of retrofit2.Platform
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
5reactions
MihaelBerciccommented, Aug 15, 2021

Has this been resolved yet?

Greetings,

This is a related issue.

I’m using:

  • Android Studio 4.2
  • Retrofit 2.9.0
  • Kotlin 1.5.10
  • Jdk 1.8.0_292
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by retrofit2.Platform (file:/home/marlonlom/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/retrofit/2.9.0/d8fdfbd5da952141a665a403348b74538efc05ff/retrofit-2.9.0.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of retrofit2.Platform
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
Read more comments on GitHub >

github_iconTop Results From Across the Web

What is an illegal reflective access? - java - Stack Overflow
Run it with --illegal-access=deny to get to know about and avoid opening packages from one module to another without a module declaration ...
Read more >
Java 9 Illegal Reflective Access Warning - Baeldung
In the above picture, deep reflection means using the Reflection API to get access to non-public members of a class by invoking the ......
Read more >
An illegal reflective access operation has occurred when ...
You will see An illegal reflective access operation has occurred warning when installing and using AM (including Amster and ssoadm tools), Java ...
Read more >
How to fix “an illegal reflective access operation has occurred”
The "an illegal reflective access operation has occurred" warning message is related to the unauthorized access to parts of the JDK made by ......
Read more >
How can I solve "WARNING:An illegal reflective access ...
You can specify the reflective access explicitly using java's --add-opens parameter. The migration guide for JDK 11 provides more information. Use a compatible ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found