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

Guice 4.2.0 issues, fixed with upgrading to 5.0.1 #141

Open
Avec112 opened this issue Nov 10, 2021 · 0 comments
Open

Guice 4.2.0 issues, fixed with upgrading to 5.0.1 #141

Avec112 opened this issue Nov 10, 2021 · 0 comments

Comments

@Avec112
Copy link

Avec112 commented Nov 10, 2021

I could not instantiate Fairy (Fairy.create()) when testing JFairy for the first time today.

My config

  • JDK 15 and 17
  • Jfairy 0.6.4
  • Spring Boot 2.5.6

Error

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/C:/Users/John/.m2/repository/com/google/inject/guice/4.2.0/guice-4.2.0.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
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

The problem seems to be that JFairy depends on these old versions:

<dependency>
  <groupId>com.google.inject</groupId>
  <artifactId>guice</artifactId>
  <version>4.2.0</version>
</dependency>
<dependency>
  <groupId>com.google.inject.extensions</groupId>
  <artifactId>guice-assistedinject</artifactId>
  <version>4.2.0</version>
</dependency>

Upgrading to latest version 5.0.1 have solved the problem

<dependency>
    <groupId>com.google.inject</groupId>
    <artifactId>guice</artifactId>
    <version>5.0.1</version>
</dependency>
<dependency>
    <groupId>com.google.inject.extensions</groupId>
    <artifactId>guice-assistedinject</artifactId>
    <version>5.0.1</version>
</dependency>

This Guice Issue confirms this problem.

I recommend updating to newest version for Guice and Guice Assisted Inject

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

No branches or pull requests

1 participant