Maven Gatling 3.0.2 not working

130 views
Skip to first unread message

Yao Hong Kok

unread,
May 8, 2019, 3:39:06 PM5/8/19
to Gatling User Group
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....

Guillaume CORRE

unread,
May 13, 2019, 3:38:02 AM5/13/19
to gat...@googlegroups.com
Hi,

Is this a duplicate of the issue where I asked you what happens when you upgrade Gatling version's (not the plugin) to 3.1.1?

--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gatling/4a8db6fa-cd71-4602-916d-110a10f39f99%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Guillaume CORRÉ
Gatling Lead Backend Engineer

-
Join our Gatling User Groups in Paris and NYC
Reply all
Reply to author
Forward
0 new messages