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

[BUG] Incompatibility with OpenJDK 21: NoSuchMethodException for sun.misc.Unsafe.defineClass #113

Closed
vmicka opened this issue May 31, 2024 · 2 comments · Fixed by #119
Closed
Labels
bug Something isn't working

Comments

@vmicka
Copy link

vmicka commented May 31, 2024

Describe the bug
When running the bpmn layout generator with OpenJDK 21, a NoSuchMethodException occurs due to the absence of the sun.misc.Unsafe.defineClass method, causing a failure in JAXB context initialization.

To Reproduce
1- Use OpenJDK 21
2- sh java -jar lib/bpmn-layout-generator-0.1.4-jar-with-dependencies.jar --output=src/diagrams/diagram-with-layout.bpmn src/diagrams/diagram.bpmn

Expected behavior
The command should execute without throwing an exception, generating the BPMN diagram, as it does with OpenJDK 11

Desktop

  • OS: Ubuntu 22.04
  • Java Version: OpenJDK 21
@vmicka vmicka added the bug Something isn't working label May 31, 2024
@tbouffard
Copy link
Member

tbouffard commented May 31, 2024

Hi
JDK 17 and 21 are not tested nor guarantee to work
https://github.com/process-analytics/bpmn-layout-generators/blob/bpmn-layout-generator-0.1.4/java/README.md

Requirements
JDK 8 or JDK 11

In the GH Actions workflow, we only run with JDK 8 and 11 and there is a comment mentioning a build error with JDK 17 (https://github.com/process-analytics/bpmn-layout-generators/blob/118ded76772377b0d9cef03a7bc40a938344b55d/.github/workflows/build-java.yml)

# java 17 fails: Fatal error compiling: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x2fcad999) cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module @0x2fcad999

So what you mention here is that this project support run on JDK 21.

@tbouffard
Copy link
Member

tbouffard commented Aug 22, 2024

JDK 21 will be provided in the next release (0.2.0).
See https://github.com/process-analytics/bpmn-layout-generators/releases/tag/v0.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants