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 failed: Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

See original GitHub issue

Hello, so I tried to run the FXSampler as described in the readme.md by cloning it, checking out a branch (9.0.0 in my case) and running ./gradlew run. However, there is a Gradle exception saying: Could not initialize class org.codehaus.groovy.runtime.InvokerHelper After a bit of googling I found out that you could change the gradle-wrapper.properties to pull Gradle 6.3 instead of 6.0.1, which indeed fixed this problem. However, now the build fails saying: Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. I have no idea why this is a problem since I am not even using Gradle 7.0. Any help would be appreciated. Thanks!

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
marcin-chwedczukcommented, May 1, 2021

I got this error on brach jfx-13 and JDK 14. To fix update Gradle wrapper to at least 6.3 as described here: https://stackoverflow.com/a/61509462/1779504

1reaction
mltcommented, Feb 14, 2021

Might be related that gradle has an issue 12599. One has to upgrade gradle to use newer jdk. I updated wrapper with gradle wrapper to 6.8. Then I was able to build with ./gradlew build check -x javadoc. However, I still can’t run examples 😦

Error occurred during initialization of boot layer
java.lang.module.FindException: Error reading module: C:\dev\java\controlsfx\controlsfx-samples\build\classes\java\main
Caused by: java.lang.module.InvalidModuleDescriptorException: Package org.controlsfx.fxsampler.fxsampler not found in module

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':controlsfx-samples:run'.
> Process 'command 'C:\tools\jdk-14.0.1\bin\java.exe'' finished with non-zero exit value 1
Read more comments on GitHub >

github_iconTop Results From Across the Web

"Could not initialize class org.codehaus.groovy.runtime ...
I tried to upgrade a Gradle project to JDK 14. Steps to Reproduce. Create a simple Gradle project by creating the following build.gradle...
Read more >
Gradle: Could not initialize class org.codehaus.groovy.runtime ...
This error is caused due to incompatible JAVA JDK and Gradle version in the project. Head to ./android/gradle/wrapper/gradle-properties ...
Read more >
Could not initialize class org.codehaus ... - JetBrains YouTrack
What went wrong: Could not initialize class org.codehaus.groovy.runtime.InvokerHelper. Try: Run with --stacktrace option to get the stack trace.
Read more >
[ SOLVED ] * What went wrong:Could not initialize class org ...
FAILURE: Build failed with an exception. * What went wrong: Could not initialize class org. codehaus. groovy. runtime. InvokerHelper * Try: Run ...
Read more >
Could not initialize class org.codehaus.groovy ... - YouTube
Hi guys in this video I will show you how to fix this errorCould not initialize class org. codehaus. groovy. runtime. InvokerHelper Could...
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