Skip to content

Compile error - No such class: jdk.Profile+Annotation #1231

@walery

Description

@walery

A few days ago, I had faced an issue that only appears under JDK >=11 but not under JDK 8.
The error was:

Groovy: compiler error: exception in phase 'canonicalization' in source unit '/private/tmp/j11i/groovy-eclipse-compiler-jdk11-issue/src/main/java/compilerissue/Foo.groovy' No such class: jdk.Profile+Annotation -- JDTClassNode.getTypeClass() cannot locate it using transform loader

I was not able to nail down the issue itself. To share the problem, I've isolated and shrunk the project as much as I could. A full example with one small class and one pom.xml is in this repo:

https://github.com/walery/groovy-eclipse-compiler-jdk11-issue

The main purpose is to share the problem with you. I've fixed it by switching to gmavenplus plugin.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions