Skip to content

Micronaut 3 migration using Maven fails with IllegalAccessError #6292

Closed
@sergey-morenets

Description

@sergey-morenets

Expected Behavior

Micronaut 3 migration should complete without errors

Actual Behaviour

Micronaut 3 migration fails with exception:

[ERROR] Failed to execute goal org.openrewrite.maven:rewrite-maven-plugin:4.12.0:dryRun (default-cli) on project demo: Execution default-cli of goal org.openrewrite.maven:rewrite-maven-plugin:4.12.0:dryRun failed: An API incompatibility was encountered while executing org.openrewrite.maven:rewrite-maven-plugin:4.12.0:dryRun: java.lang.IllegalAccessError: superclass access check failed: class org.openrewrite.java.Java11Parser$ByteArrayCapableJavacFileManager (in unnamed module @0x76cdafa3) cannot access class com.sun.tools.javac.file.JavacFileManager (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.file to unnamed module @0x76cdafa3

Steps To Reproduce

  1. Go to https://micronaut.io/launch
  2. Add openrewrite feature, select Maven build tool and leave other options to have the default values (Micronaut version 3.0.3)
  3. Generate and save the project
  4. Open command-line in the project folder and run command: mvn rewrite:dryRun
  5. You get the mentioned exception

Environment Information

JDK version: 16.0.2
Maven version: 3.6.2

Example Application

No response

Version

3.0.3

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions