Can't find jar matching scala-compiler.*\.jar while 'mvn gatling:execute'

When i try to ‘$mvn gatling:execute’, it errors out saying

ERROR in ch.qos.logback.core.joran.spi.Interpreter@5:19 - no applicable action for [immediateFlush], current ElementPath is [[configuration][appender][immediateFlush]]

And the exception i see is:

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.RuntimeException: Can’t find the jar matching scala-compiler.*.jar$
at io.gatling.compiler.ZincCompiler$$anonfun$jarMatching$1$2.apply(ZincCompiler.scala:117)
at io.gatling.compiler.ZincCompiler$$anonfun$jarMatching$1$2.apply(ZincCompiler.scala:117)
at scala.Option.getOrElse(Option.scala:120)
at io.gatling.compiler.ZincCompiler$.jarMatching$1(ZincCompiler.scala:117)
at io.gatling.compiler.ZincCompiler$.io$gatling$compiler$ZincCompiler$$setupZincCompiler(ZincCompiler.scala:119)
at io.gatling.compiler.ZincCompiler$delayedInit$body.apply(ZincCompiler.scala:137)
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

Please let me know how to go about with this.

Thank you

Did you find the solution? I am facing same error and have No idea why.

`

<?xml version="1.0" encoding="UTF-8"?>


4.0.0
tests
1.0.0-SNAPSHOT
Performance Test

showcase
XYZ
1.0-SNAPSHOT


<gatling.version>2.3.0</gatling.version>

io.gatling.highcharts gatling-highcharts ${gatling.version} pom test org.scala-lang scala-reflect 2.13.0-M2 io.gatling gatling-core ${gatling.version} org.scala-lang scala-compiler 2.13.0-M2 io.gatling gatling-maven-plugin 3.0.0-M1 target/gatling/results src/test/resources/bodies src/test/scala true true RecordedSimulation true test execute

`

Hi folks,

I just migrated to Gatling 2.3.0 and remember seeing this error - maybe https://github.com/sgoeschl/gatling-blueprint-project/blob/master/pom.xml might help

Thanks in advance, Siegfried Goeschl

Same here - dropped back to 2.2.4 for now.

No idea what you do but the problem is definitively on your side.
The demo works just fine: https://github.com/gatling/gatling-maven-plugin-demo/blob/master/pom.xml

It happens when I try to run “mvn install io.gatling:gatling-maven-plugin:test” (just the plugin directly). Simulations and running the Engine work directly (through IntelliJ)

Again, please provide a reproducer.
You can check for yourself that the command you provided works just fine against the demo: https://github.com/gatling/gatling-maven-plugin-demo

Using gatling-maven-plugin 2.2.4 and gatling 2.3.0 fixes this problem (no definition of the scala compiler in my pom)

I had the same problem. I followed the link to the working demo pom and used their versions and the most recent version of gatling on maven central (2.3.1 at time of writing).

The problem persisted. I noticed the following dependency in the pom I was using that was not in the demo pom:

<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>

When I removed this, it worked.

I tried upgrading gatling-maven-plugin but any 3x version did not work. Here are the versions that worked for me:

`

<gatling.version>2.3.1</gatling.version>
<gatling-maven-plugin.version>2.2.4</gatling-maven-plugin.version>
<scala-maven-plugin.version>3.3.2</scala-maven-plugin.version>

`

Had the exact same problem when using the latest releases of the plugins.

`

<gatling.version>2.3.1</gatling.version>
<gatling-maven-plugin.version>3.0.0</gatling-maven-plugin.version>
<scala-maven-plugin.version>3.4.2</scala-maven-plugin.version>

`

Maven plugin 3 is to be used with Gatling 3, not 2.

That was simple enough!

Using the following versions bypassed the error above.

`

<gatling.version>3.0.0-RC2</gatling.version>
<gatling-maven-plugin.version>3.0.0</gatling-maven-plugin.version>
<scala-maven-plugin.version>3.4.2</scala-maven-plugin.version>

`