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

Hello,

I am having problems integrating a Gatling execution as a Maven profile in my project. The profile goes like this:

performance

io.gatling
gatling-maven-plugin
${gatling.version}

test1
test

execute

When executing “mvn install -P performance”, I have this problem:

[INFO] — gatling-maven-plugin:2.2.0:execute (test1) @ epaye —
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:483)
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-library.*.jar$
at io.gatling.compiler.ZincCompiler$$anonfun$jarMatching$1$2.apply(ZincCompiler.scala:118)
at io.gatling.compiler.ZincCompiler$$anonfun$jarMatching$1$2.apply(ZincCompiler.scala:118)
at scala.Option.getOrElse(Option.scala:120)
at io.gatling.compiler.ZincCompiler$.jarMatching$1(ZincCompiler.scala:118)
at io.gatling.compiler.ZincCompiler$.io$gatling$compiler$ZincCompiler$$setupZincCompiler(ZincCompiler.scala:121)
at io.gatling.compiler.ZincCompiler$delayedInit$body.apply(ZincCompiler.scala:138)
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

I have not found documentation of this error over Internet. The only similar question is this one: http://stackoverflow.com/questions/34340481/if-i-run-a-plugin-from-the-command-line-at-the-root-pom-what-does-it-do-when-tr
But it fails to give me a clue about what is happening :frowning:

Can you please help me?

Thank you very much

Gatling version is 2.2.0, by the way.

I suspect you’re missing the scala library dependency.
Create a fresh project from the maven archetype.

Thank you, that was the problem. I have created a new project with the archetype, and I have copied the contents of its pom.xml to my project. Now it works :slight_smile:

Great !