No longer able to run test using the IDE
Hi,
Using IntelliJ IDEA Community. I had to reinstall the IDE because of startup issues (that was recommended by Jetbrain in a support ticket).
After reinstallation, everything was working perfectly except one thing: Running tests using gradle plugin.
I am able to run test in the command line with `gradlew test` without issues.
But using the gradle pane and double clicking on test show the following error:
> Task :ocpp-websocket:test FAILEDError: Could not find or load main class worker.org.gradle.process.internal.worker.GradleWorkerMainCaused by: java.lang.ClassNotFoundException: worker.org.gradle.process.internal.worker.GradleWorkerMainError: Could not find or load main class worker.org.gradle.process.internal.worker.GradleWorkerMain
Caused by: java.lang.ClassNotFoundException: worker.org.gradle.process.internal.worker.GradleWorkerMain
Execution failed for task ':ocpp-websocket:test'.> Process 'Gradle Test Executor 1' finished with non-zero exit value 1
* Try:> Run with --stacktrace option to get the stack trace.> Run with --info or --debug option to get more log output.> Run with --scan to get full insights.
Same thing when clicking on the “play” button beside a test. All of this is still working for my co-workers who use the same code with the same “wrapper”. Like I said, it is working perfectly in command line so “gradle” itself is not the problem but the integration of gradle by IntelliJ is.
What I have tried so far:
- Make sure the configuration of the gradle build tool is ok.
- Delete all the gradle cache both in the project and in the user.
- Invalidate Cache and restart
- Re-install IntelliJ IDEA
- Update everything to latest version
- Update the gradle wrapper
- Delete the whole project and clone again
Any help is appreciated.
Thanks
请先登录再写评论。
The issue was resolved by moving the Gradle User Home to “
C:\gradlecache” from it's default location.