When I run "mvn clean gatling:test -Dgatling.simulationClass=package.SimpleSim", I get the following error:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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.<init>(CommandLineConstant.scala:19)
at io.gatling.app.cli.CommandLineConstants$.<init>(CommandLineConstants.scala:22)
at io.gatling.app.cli.CommandLineConstants$.<clinit>(CommandLineConstants.scala)
at io.gatling.app.cli.ArgsParser$$anon$1.<init>(ArgsParser.scala:30)
at io.gatling.app.cli.ArgsParser.<init>(ArgsParser.scala:28)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:46)
at io.gatling.app.Gatling$.main(Gatling.scala:39)
at io.gatling.app.Gatling.main(Gatling.scala)
The funny thing is - I have other Gatling projects that runs fine using a same version of Maven Gatling. My POM is similar to the ones that are working properly right now. The POM looks like this:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<gatling.version>3.0.3</gatling.version>
<gatling-plugin.version>3.0.2</gatling-plugin.version>
</properties>
<dependencies>
<!-- <dependency>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.4.6</version>
</dependency> -->
<!-- <dependency>
<groupId>org.scalaj</groupId>
<artifactId>scalaj-http_2.12</artifactId>
<version>2.4.1</version>
</dependency> -->
<dependency>
<groupId>io.gatling.highcharts</groupId>
<artifactId>gatling-charts-highcharts</artifactId>
<version>${gatling.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.typesafe</groupId>
<artifactId>config</artifactId>
<version>1.3.4</version>
</dependency>
<dependency>
<groupId>com.typesafe.scala-logging</groupId>
<artifactId>scala-logging_2.12</artifactId>
<version>3.9.0</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main</sourceDirectory>
<testSourceDirectory>src/test</testSourceDirectory>
<plugins>
<plugin>
<groupId>io.gatling</groupId>
<artifactId>gatling-maven-plugin</artifactId>
<version>${gatling-plugin.version}</version>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<configFolder>${project.basedir}/src/test/resources/gatling_conf</configFolder>
<runMultipleSimulations>true</runMultipleSimulations>
<includes>
<simulationClass>package.RunRequestSimulation</simulationClass>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Any help would be greatly appreciated....