Getting error while running gatling test using maven

I am running the test using mvn gatling:test
I have gatling version : 3.3.1
Java version : 1
Scala version 2.13.9
But I am not able to run the test I keep getting this error
java.lang.reflect.InvocationTargetException

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

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.NoSuchMethodError: scala.Product.$init$(Lscala/Product;)V

at io.gatling.core.cli.CommandLineConstant.(CommandLineConstant.scala:19)

at io.gatling.app.cli.CommandLineConstants$.(CommandLineConstants.scala:22)

at io.gatling.app.cli.CommandLineConstants$.(CommandLineConstants.scala)

at io.gatling.app.cli.ArgsParser$$anon$1.(ArgsParser.scala:30)

at io.gatling.app.cli.ArgsParser.(ArgsParser.scala:28)

at io.gatling.app.Gatling$.fromArgs(Gatling.scala:45)

at io.gatling.app.Gatling$.main(Gatling.scala:38)

at io.gatling.app.Gatling.main(Gatling.scala)

First, Gatling 3.3.1 is super old, you should definitely upgrade. The latest version is 3.9.5.

Then, Gatling 3.3.1 is only compatible with Scala 2.12, not Scala 2.13. The Scala 2.13 upgrade was done in Gatling 3.5.

Note: as you’re not familiar with Scala, you should go with Gatling Java instead (only available in modern Gatling versions).

Thanks for the help.
earlier error got resolved but getting a new error now
Can you please help on this
This is a built project, and it was inactive for some time so can not change the language

java.lang.reflect.InvocationTargetException

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

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.NoClassDefFoundError: io/netty/internal/tcnative/CertificateCompressionAlgo

Failed to execute goal io.gatling:gatling-maven-plugin:3.0.3:test (default-cli) on project ExpensesMicroService: Gatling failed.: Process exited with an error: 255 (Exit value: 255)

@harshit Please don’t hijack an existing and resolved topic. Create a new one instead.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.