Getting error: java.lang.RuntimeException: Can't find the jar matching scala-library-.*\.jar$

Hi team I am getting error: java.lang.RuntimeException: Can’t find the jar matching scala-library-.*.jar$
While trying to run gatling tast using mvn gatling:test
I am using gatling version: 3.9.0
These are the dependency which I have added:

<dependency>
            <groupId>io.gatling.highcharts</groupId>
            <artifactId>gatling-charts-highcharts</artifactId>
            <version>3.9.0</version>
        </dependency>
        <dependency>
            <groupId>io.gatling</groupId>
            <artifactId>gatling-app</artifactId>
            <version>3.9.0</version>
        </dependency>
<plugins>
            <plugin>
                <groupId>io.gatling</groupId>
                <artifactId>gatling-maven-plugin</artifactId>
                <version>3.1.2</version>
                <configuration>
                    <configFolder>${project.basedir}/src/test/performance/resources</configFolder>
                    <resourcesFolder>${project.basedir}/src/test/performance/resources</resourcesFolder>
                    <simulationsFolder>${project.basedir}/src/test/performance/scala</simulationsFolder>
                    <simulationClass>com.oracle.fa.expenses.simulations.expensesSimulation</simulationClass>
                    <resultsFolder>${project.basedir}/src/test/performance/results</resultsFolder>
                </configuration>
            </plugin>

Hi,

Several issues:

  • your Gatling version is outdated, the latest as of now is 3.9.5
  • your gatling-maven-plugin version is way too outdated, the latest as of now is 4.6.0 (beware that our plugin no longer takes care of compiling Scala code but requires scala-maven-plugin if you’re using Gatling Scala instead of Gatling Java)
  • remapping the folders is not recommended unless you really know what you’re doing. Otherwise, you should stick to the default and if you need to isolate from your application sources, move into a module or a different project (possibly in the same repo)
  • Gatling Scala is nowadays only recommended to Scala developers. Other users should use Gatling Java as the learning effort is lower.

Please have a look at the official maven sample projects:

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