Simulation failure error

Hi Team,
I am working on a performance testing sample using gatling and getting the below error.
Attached my pom. Could you please assist on this issue?

C:\sasi\IdeaProjects\gatling-testing>mvn clean gatling:execute

[INFO] Scanning for projects…
[INFO]
[INFO] --------------------< com.example:gatling-testing >---------------------
[INFO] Building demo 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] — maven-clean-plugin:2.5:clean (default-clean) @ gatling-testing —
[INFO] Deleting C:\sasi\IdeaProjects\gatling-testing\target
[INFO]
[INFO] — gatling-maven-plugin:2.2.3:execute (default-cli) @ gatling-testing —
01:44:50,215 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
01:44:50,215 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
01:44:50,215 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/C:/Users/makes/.m2/repository/io/gatling/gatling-maven-plugin/2.2.3/gatling-maven-plugin-2.2.3.jar!/logback.xml]
01:44:50,231 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@57c03d88 - URL [jar:file:/C:/Users/makes/.m2/repository/io/gatling/gatling-maven-plugin/2.2.3/gatling-maven-plugin-2.2.3.jar!/logback.xml] is not of type file
01:44:50,339 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
01:44:50,366 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
01:44:50,373 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
01:44:50,378 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@5:19 - no applicable action for [immediateFlush], current ElementPath is [[configuration][appender][immediateFlush]]
01:44:50,379 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
01:44:50,442 |-INFO in ch.qos.logback.classic.joran.action.LevelAction - ROOT level set to WARN
01:44:50,442 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE] to Logger[ROOT]
01:44:50,442 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
01:44:50,442 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@16aa8654 - Registering current configuration as safe fallbjava.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
ack point

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader ‘bootstrap’)
at io.gatling.compiler.ZincCompiler$delayedInit$body.apply(ZincCompiler.scala:56)
at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.collection.immutable.List.foreach(List.scala:318)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
at scala.App$class.main(App.scala:71)
at io.gatling.compiler.ZincCompiler$.main(ZincCompiler.scala:36)
at io.gatling.compiler.ZincCompiler.main(ZincCompiler.scala)
… 6 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.744 s
[INFO] Finished at: 2021-09-27T01:44:50-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.gatling:gatling-maven-plugin:2.2.3:execute (default-cli) on project gatling-testing: Gatling failed.: Simulations compilation failed. Process exited with an error: -1 (Exit value: -1) → [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Thanks

pom.xml (4.02 KB)

You’re using Gatling 2 that was terminated several years ago.
There’s no way to help you with such an old version.
Please upgrade to Gatling 3 (the latest version is 3.6.1).