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

1,360 views
Skip to first unread message

javier....@talanlabs.com

unread,
Apr 18, 2016, 12:12:42 PM4/18/16
to Gatling User Group
Hello,

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

<profile>
<id>performance</id>
<build>
<plugins>
<plugin>
<groupId>io.gatling</groupId>
<artifactId>gatling-maven-plugin</artifactId>
<version>${gatling.version}</version>

<executions>
<execution>
<id>test1</id>
<phase>test</phase>
<goals>
<goal>execute</goal>
</goals>

</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

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 :(

Can you please help me?

Thank you very much

javier....@talanlabs.com

unread,
Apr 18, 2016, 12:13:22 PM4/18/16
to Gatling User Group
Gatling version is 2.2.0, by the way.

Stéphane LANDELLE

unread,
Apr 18, 2016, 2:05:30 PM4/18/16
to gat...@googlegroups.com
I suspect you're missing the scala library dependency.
Create a fresh project from the maven archetype.

Stéphane Landelle
GatlingCorp CEO


--
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.
For more options, visit https://groups.google.com/d/optout.

javier....@talanlabs.com

unread,
Apr 19, 2016, 5:38:22 AM4/19/16
to Gatling User Group
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 :)

slan...@gatling.io

unread,
Apr 19, 2016, 6:02:25 AM4/19/16
to gat...@googlegroups.com
Great !
Reply all
Reply to author
Forward
0 new messages