Gradlew java/lang/NoClassDefFoundError:

I just cloned the GitHub - gatling/gatling-gradle-plugin-demo: Showcase of the Gatling Plugin for Gradle. when i open and run the project in Intellij using the following command:

I get following error:

Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:“C:\Program Files (x86)\Micro Focus\Unified Functional Testing\bin\java_shared\classes\jasmine.jar”

Task :gatlingRun-computerdatabase.BasicSimulation FAILED
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:“C:\Program Files (x86)\Micro Focus\Unified Functional Testing\bin\java_shared\classes\jasmine.jar”

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:gatlingRun-computerdatabase.BasicSimulation’.

There’re failed simulations: computerdatabase.BasicSimulation

  • 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.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See Command-Line Interface

BUILD FAILED in 9s
4 actionable tasks: 4 executed
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook

Thanks,
Girish

It looks like your Java installation is completely broken.
From a quick search, it looks like this is caused by a product from Micro Focus: https://stackoverflow.com/questions/10324186/error-message-in-trying-to-run-java
I recommend you install a proper standard JDK that is not tampered by a third party vendor (then check your PATH to make sure you have the correct one).

Thanks that helped resolve the issue.

But i still keep getting this warning

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See https://docs.gradle.org/6.6.1/userguide/command_line_interface.html#sec:command_line_warnings

I have to use gradlew Clean the run the command : gradlew gatlingRun-computerdatabase.BasicSimulation for it to work.

Thanks,
Girish

warnings are warnings, not errors

But it does not run the simulation. it just returns warning. I need to do a gradle clean for simulation to run.