Gatling Jenkins integration gives error

Hi,
I was trying to run the Gatling simulation through Jenkins. These are the steps i followed:

  1. I installed https://github.com/jenkinsci/gatling-plugin plugin in Jenkins
  2. Added the below mentioned plugin configuration in the project’s pom.xml
net.alchim31.maven scala-maven-plugin ${scala-maven-plugin.version} io.gatling gatling-maven-plugin ${gatling-plugin.version} execute
  1. Added the following dependencies also in pom.xml
io.gatling.highcharts gatling-charts-highcharts ${gatling.version} test io.gatling gatling-http ${gatling.version}

But when i try to run the build it is giving the following error:

Downloading: http:///repository/org/scala-lang/scala-compiler/2.11.8/scala-compiler-2.11.8.jar
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:497)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: sbt.InvalidScalaInstance: Scala instance doesn’t exist or is invalid:
version unknown, library jar: /java2/maven-repo/org/scala-lang/scala-library/2.11.8/scala-library-2.11.8.jar, compiler jar: /java2/maven-repo/org/scala-lang/scala-compiler/2.11.8/scala-compiler-2.11.8.jar
at sbt.ScalaInstance$.slowActualVersion(ScalaInstance.scala:125)
at sbt.ScalaInstance$.sbt$ScalaInstance$$actualVersion(ScalaInstance.scala:122)
at sbt.ScalaInstance$$anonfun$actualVersion$1.apply(ScalaInstance.scala:36)
at sbt.ScalaInstance$$anonfun$actualVersion$1.apply(ScalaInstance.scala:36)
at scala.Option.getOrElse(Option.scala:120)
at sbt.ScalaInstance.actualVersion$lzycompute(ScalaInstance.scala:36)
at sbt.ScalaInstance.actualVersion(ScalaInstance.scala:36)
at com.typesafe.zinc.Compiler$.compilerInterface(Compiler.scala:144)
at com.typesafe.zinc.Compiler$.create(Compiler.scala:53)
at io.gatling.compiler.ZincCompiler$delayedInit$body.apply(ZincCompiler.scala:148)
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
Caused by: java.lang.ClassNotFoundException: scala.tools.nsc.Properties
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)

What could be the reason for this error ?

regards
Krishna

Looks like a broken download/corrupted jar.

Ok. Shall check that. Do I need any Scala compiler running in Jenkins for this integration?
Thanks
Regards
Krishna

Jenkins is just a cron. What triggers compilation is your project build tool (maven, sbt or whatever).

Thanks

Hi Stephane,

You were right after downloading the proper jar the previous error is rectified.
Now i am getting the following error:

There is no simulation script. Please check that your scripts are in user-files/simulations
The requested class(‘Simulation.class’) can not be found in the classpath or does not extends Simulation.

Is there any specific folder structure i need to follow? The Simulation.class is available in the target folder of the Jenkins workspace.

regards
Krishna

Solved this, my mistake. The maven profile was in sub project so it was not executing the simulations.
Thanks!