Every so often, I run into a compile error:
[INFO] Collecting simulations…
[INFO] Exception in thread “main” java.lang.LinkageError: loader (instance of scala/tools/nsc/interpreter/AbstractFileClassLoader): attempted duplicate class definition for name: “com/mypackage/AbstractParentSimulation”
[INFO] at java.lang.ClassLoader.defineClass1(Native Method)
[INFO] at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
[INFO] at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
[INFO] at scala.tools.nsc.interpreter.AbstractFileClassLoader.findClass(AbstractFileClassLoader.scala:52)
[INFO] at com.excilys.ebi.gatling.app.Gatling$$anonfun$loadSimulationClasses$4.apply(Gatling.scala:205)
[INFO] at com.excilys.ebi.gatling.app.Gatling$$anonfun$loadSimulationClasses$4.apply(Gatling.scala:205)
[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.Gatling.loadSimulationClasses(Gatling.scala:205)
[INFO] at com.excilys.ebi.gatling.app.Gatling.start(Gatling.scala:105)
[INFO] at com.excilys.ebi.gatling.app.Gatling$.main(Gatling.scala:69)
[INFO] at com.excilys.ebi.gatling.app.Gatling.main(Gatling.scala)
This is while running through the maven plugin. Basically, there are a bunch of simulation classes that extend a base simulation.
This setup works on my windows machine and my ubuntu machine, but on the centos machine(s), it fails. Any tips on getting around this?