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.

Build failure with JDK 17

See original GitHub issue

Hi guys, I got the following error while trying to build with openjdk 17 2021-09-14

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.700 s
[INFO] Finished at: 2021-11-03T16:08:42+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project jfrunit: Compilation failure
[ERROR] jfrunit/src/main/java/org/moditect/jfrunit/internal/SyncEvent.java:[26,8] cannot access jdk.internal.event.Event
[ERROR]   class file for jdk.internal.event.Event not found

I also read the #39, but I didn’t understand the solution 😃

Could you explain to me how to build jfr? Do I need to set some “special” configuration to my JDK?

Cheers Daniele

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Crowaycommented, Nov 5, 2021

Hi @gunnarmorling, @danieledipompeo, I wanted to do the same and had the same error, I think it is due to jdk.internal.event module exposure is changed in jdk17, I managed to let jfrunit build on jdk17 https://github.com/moditect/jfrunit/tree/build-jdk-17 but I’m not 100% sure this can be a solution. changes

0reactions
danieledipompeocommented, Nov 19, 2021

@Croway yes I’m from L’Aquila 😃

I’ll prepare the PR in the next few days,

I’ll keep you posted

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java 17: Maven doesn't give much information about the error ...
I changed the java version in maven to execute with JDK 8 and JDK 11 and there's no error: BUILD SUCCESS. I got...
Read more >
Error (Java SE 17 & JDK 17) - Oracle Help Center
An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch. Most such errors...
Read more >
Build with jdk17 fails · Issue #307 · siom79/japicmp - GitHub
Can be solved by upgrading to latest mockito version. But javassist's CtClass.toClass() cannot be called with jdk17: jboss-javassist/javassist#400. Currently ...
Read more >
Java 17 compilation error – IDEs Support (IntelliJ Platform)
Trying to compile and run java 17 switch pattern, initially was showing error with red underlined. Once I have set the language level...
Read more >
Build fail in github - set up jdk 17 failed - Sonar Community
Template for a good new topic, formatted with Markdown: ALM used : Github CI system used : Jenkins Languages of the repository :...
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