Hi,
I cloned the gatling jenkins plugin and I have the following build error :
[ERROR] COMPILATION ERROR :[INFO] -------------------------------------------------------------
[ERROR] error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider org.kohsuke.stapler.jsr269.ExportedBeanAnnotationProcessor could not be instantiated: java.lang.NoClassDefFoundError: com/google/common/collect/Multimap[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
My config :
java version “1.6.0_24”
OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~10.04.2)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
Apache Maven 2.2.1 (rdebian-1)
I tried a mvn clean package from CLI and Intellij.
I first tried in jenkins then reproduced with maven locally.
So now I’m testing locally.
I tried the https://github.com/nhuray/gatling-maven-project (which uses gatling 1.2.5) locally and it works.
Now I’m trying to make this demo project work with last gatling 1.3.4 (always with local maven). It does not compile with gatling 1.3.4.
[INFO] Exception in thread “main” java.lang.ClassNotFoundException: MySimulation
[INFO] at scala.tools.nsc.interpreter.AbstractFileClassLoader.findClass(AbstractFileClassLoader.scala:51)
[INFO] at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
[INFO] at scala.tools.nsc.interpreter.AbstractFileClassLoader.scala$tools$nsc$util$ScalaClassLoader$$super$loadClass(AbstractFileClassLoader.scala:17)
[INFO] at scala.tools.nsc.util.ScalaClassLoader$class.loadClass(ScalaClassLoader.scala:50)
[INFO] at scala.tools.nsc.interpreter.AbstractFileClassLoader.loadClass(AbstractFileClassLoader.scala:17)
[INFO] at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
[INFO] at com.excilys.ebi.gatling.app.FileSystemBackedSimulationClassLoader$$anonfun$3.apply(SimulationClassLoader.scala:73)
[INFO] at com.excilys.ebi.gatling.app.FileSystemBackedSimulationClassLoader$$anonfun$3.apply(SimulationClassLoader.scala:73)
[INFO] at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
[INFO] at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
[INFO] at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
[INFO] at scala.collection.immutable.List.foreach(List.scala:76)
[INFO] at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
[INFO] at scala.collection.immutable.List.map(List.scala:76)
[INFO] at com.excilys.ebi.gatling.app.FileSystemBackedSimulationClassLoader.simulationClasses(SimulationClassLoader.scala:73)
[INFO] at com.excilys.ebi.gatling.app.Gatling$$anonfun$10.apply(Gatling.scala:83)
[INFO] at com.excilys.ebi.gatling.app.Gatling$$anonfun$10.apply(Gatling.scala:78)
[INFO] at scala.Option.getOrElse(Option.scala:108)
[INFO] at com.excilys.ebi.gatling.app.Gatling.start(Gatling.scala:78)
[INFO] at com.excilys.ebi.gatling.app.Gatling$.fromMap(Gatling.scala:66)
[INFO] at com.excilys.ebi.gatling.app.Gatling$.main(Gatling.scala:61)
[INFO] at com.excilys.ebi.gatling.app.Gatling.main(Gatling.scala)
I copyed-pasted my simulation in the gatling-maven-project and successfully built it with gatling 1.3.4.
So I think I’m gonna reset (delete and recreate) my whole project.
Currently, 1 Jenkins job = 1 simulation, due to some limitations of the Maven plugin, so you don’t have a choice here…
You’ll have to create a new job for each simulation you want to run, but you can make your simulations jobs depends on the main project, so that the simulations are run after the main project is built.
You can also chain your simulations jobs (one simulation job depends on the main project, the others depends on a another simulation job), like that :
update pom.xml to use 1.3.4
update the code of BasicExampleSimulation to compile (I removed the last if).
launch the mvn gatling:execute -Dgatling.simulations=basic.BasicExampleSimulation
=>
it works.
Now duplicate the BasicExampleSimulation, rename it as MySimulation for example.
launch the mvn gatling:execute -Dgatling.simulations=basic.MySimulation
=>
INFO] Exception in thread “main” java.lang.ClassNotFoundException: basic.MySimulation
[INFO] at scala.tools.nsc.interpreter.AbstractFileClassLoader.findClass(AbstractFileClassLoader.scala:51)
[INFO] at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
[INFO] at scala.tools.nsc.interpreter.AbstractFileClassLoader.scala$tools$nsc$util$ScalaClassLoader$$super$loadClass(AbstractFileClassLoader.scala:17)
[INFO] at scala.tools.nsc.util.ScalaClassLoader$class.loadClass(ScalaClassLoader.scala:50)
[INFO] at scala.tools.nsc.interpreter.AbstractFileClassLoader.loadClass(AbstractFileClassLoader.scala:17)
[INFO] at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
[INFO] at com.excilys.ebi.gatling.app.FileSystemBackedSimulationClassLoader$$anonfun$3.apply(SimulationClassLoader.scala:73)
[INFO] at com.excilys.ebi.gatling.app.FileSystemBackedSimulationClassLoader$$anonfun$3.apply(SimulationClassLoader.scala:73)
[INFO] at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
[INFO] at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
[INFO] at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
[INFO] at scala.collection.immutable.List.foreach(List.scala:76)
[INFO] at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
[INFO] at scala.collection.immutable.List.map(List.scala:76)
[INFO] at com.excilys.ebi.gatling.app.FileSystemBackedSimulationClassLoader.simulationClasses(SimulationClassLoader.scala:73)
[INFO] at com.excilys.ebi.gatling.app.Gatling$$anonfun$10.apply(Gatling.scala:83)
[INFO] at com.excilys.ebi.gatling.app.Gatling$$anonfun$10.apply(Gatling.scala:78)
[INFO] at scala.Option.getOrElse(Option.scala:108)
[INFO] at com.excilys.ebi.gatling.app.Gatling.start(Gatling.scala:78)
[INFO] at com.excilys.ebi.gatling.app.Gatling$.fromMap(Gatling.scala:66)
[INFO] at com.excilys.ebi.gatling.app.Gatling$.main(Gatling.scala:61)
[INFO] at com.excilys.ebi.gatling.app.Gatling.main(Gatling.scala)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
I don’t get what the problem could be (but it’s really annoying).