How to choose scala version that gatling use ?

1,388 views
Skip to first unread message

Terejima Ryoko

unread,
Oct 23, 2015, 5:40:19 AM10/23/15
to Gatling User Group
Hi.

I want to use gatling maven plugin 2.1.7 for my project.
I read this to add gatling in maven :

When I run gatling:execute I have this error :

[INFO] --- gatling-maven-plugin:2.1.7:execute (default) @ zenith-portal-webui ---
Downloading: http://zenith-sf/nexus/content/groups/public/org/scala-lang/scala-library/2.10.4/scala-library-2.10.4.jar
Downloading: http://zenith-sf/nexus/content/groups/public/com/typesafe/zinc/zinc/0.3.5.3/zinc-0.3.5.3.jar
Downloaded: http://zenith-sf/nexus/content/groups/public/com/typesafe/zinc/zinc/0.3.5.3/zinc-0.3.5.3.jar (384 KB at 495.6 KB/sec)
Downloaded: http://zenith-sf/nexus/content/groups/public/org/scala-lang/scala-library/2.10.4/scala-library-2.10.4.jar (6960 KB at 762.6 KB/sec)
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.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 sbt
.compiler.RawCompiler.apply(RawCompiler.scala:26)
 at sbt
.compiler.AnalyzingCompiler$$anonfun$compileSources$1$$anonfun$apply$2.apply(AnalyzingCompiler.scala:147)
 at sbt
.compiler.AnalyzingCompiler$$anonfun$compileSources$1$$anonfun$apply$2.apply(AnalyzingCompiler.scala:142)
 at sbt
.IO$.withTemporaryDirectory(IO.scala:285)
 at sbt
.compiler.AnalyzingCompiler$$anonfun$compileSources$1.apply(AnalyzingCompiler.scala:142)
 at sbt
.compiler.AnalyzingCompiler$$anonfun$compileSources$1.apply(AnalyzingCompiler.scala:139)
 at sbt
.IO$.withTemporaryDirectory(IO.scala:285)
 at sbt
.compiler.AnalyzingCompiler$.compileSources(AnalyzingCompiler.scala:139)
 at sbt
.compiler.IC$.compileInterfaceJar(IncrementalCompiler.scala:33)
 at com
.typesafe.zinc.Compiler$.compilerInterface(Compiler.scala:148)
 at com
.typesafe.zinc.Compiler$.create(Compiler.scala:53)
 at io
.gatling.compiler.ZincCompiler$delayedInit$body.apply(ZincCompiler.scala:115)
 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:35)
 at io
.gatling.compiler.ZincCompiler.main(ZincCompiler.scala)
 
... 6 more
Caused by: java.lang.NoClassDefFoundError: scala/collection/GenTraversableOnce$class
 at scala
.reflect.io.AbstractFile.<init>(AbstractFile.scala:91)
 at scala
.reflect.io.PlainFile.<init>(PlainFile.scala:34)
 at scala
.reflect.io.AbstractFile$.getDirectory(AbstractFile.scala:47)
 at scala
.reflect.io.AbstractFile$.getDirectory(AbstractFile.scala:36)
 at scala
.tools.nsc.settings.MutableSettings$OutputDirs.setSingleOutput(MutableSettings.scala:270)
 at scala
.tools.nsc.settings.MutableSettings$OutputSetting.value_$eq(MutableSettings.scala:545)
 at scala
.tools.nsc.settings.MutableSettings$OutputSetting.<init>(MutableSettings.scala:542)
 at scala
.tools.nsc.settings.MutableSettings.OutputSetting(MutableSettings.scala:221)
 at scala
.tools.nsc.settings.ScalaSettings$class.$init$(ScalaSettings.scala:64)
 at scala
.tools.nsc.settings.MutableSettings.<init>(MutableSettings.scala:19)
 at scala
.tools.nsc.Settings.<init>(Settings.scala:12)
 at scala
.tools.nsc.Driver.process(Driver.scala:39)
 at scala
.tools.nsc.Main.process(Main.scala)
 
... 31 more
Caused by: java.lang.ClassNotFoundException: scala.collection.GenTraversableOnce$class
 at java
.net.URLClassLoader$1.run(URLClassLoader.java:372)
 at java
.net.URLClassLoader$1.run(URLClassLoader.java:361)
 at java
.security.AccessController.doPrivileged(Native Method)
 at java
.net.URLClassLoader.findClass(URLClassLoader.java:360)
 at java
.lang.ClassLoader.loadClass(ClassLoader.java:424)
 at java
.lang.ClassLoader.loadClass(ClassLoader.java:357)
 
... 44 more

I read on some topics that galting 2.1.X need scala 2.11.X.
I don't understand why it automatically download scala 2.10 on the nexus while version 2.11.7 is on our nexus.



How can I choose the version of scala that gatling will use ?

adrian...@hushmail.com

unread,
Oct 23, 2015, 6:19:21 AM10/23/15
to gat...@googlegroups.com
I can see the sbt compiler in that stacktrace which needs Scala 2.10.x If set Gatling should compile on 2.11.x
--
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.

Stéphane LANDELLE

unread,
Oct 23, 2015, 6:37:12 AM10/23/15
to gat...@googlegroups.com
Please have a look at the demo project: http://github.com/gatling/gatling-maven-plugin-demo

Stéphane Landelle
Lead developer

Pierre DAL-PRA

unread,
Oct 23, 2015, 7:20:57 AM10/23/15
to gat...@googlegroups.com
Gatling is built on Scala 2.11, but the compiler itself runs on Scala 2.10.

Terejima Ryoko

unread,
Oct 23, 2015, 9:50:41 AM10/23/15
to Gatling User Group
I download the example project and I have the same error when I run "mvn gatling:execute -Dgatling.simulationClass=computerdatabase.BasicSimulation".
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Terejima Ryoko

unread,
Oct 23, 2015, 10:55:37 AM10/23/15
to Gatling User Group
I delete all the dependencies to keep only gatling-charts-highcharts and now it works.
I think there was a conlict between some dependencies.

Stéphane LANDELLE

unread,
Oct 24, 2015, 7:05:09 AM10/24/15
to gat...@googlegroups.com
The demo's only dependency is gatling-highcharts.
I suspect you had conflicting versions of gatling or scala-library.

Stéphane Landelle
Lead developer


On Fri, Oct 23, 2015 at 4:55 PM, Terejima Ryoko <tereji...@gmail.com> wrote:
I delete all the dependencies to keep only gatling-charts-highcharts and now it works.
I think there was a conlict between some dependencies.

--
Reply all
Reply to author
Forward
0 new messages