ClassNotFoundException: xsbt.CompilerInterface

I’m having trouble starting gatling. When I try to run gatling.bat I get the following stack trace printed to the console:

GATLING_HOME is set to “C:\apps\gatling”
Exception in thread “main” java.lang.ClassNotFoundException: xsbt.CompilerInterface
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at sbt.compiler.AnalyzingCompiler.getInterfaceClass(AnalyzingCompiler.scala:88)
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:70)
at sbt.compiler.AnalyzingCompiler.newCachedCompiler(AnalyzingCompiler.scala:44)
at sbt.compiler.AnalyzingCompiler.newCachedCompiler(AnalyzingCompiler.scala:39)
at sbt.compiler.CompilerCache$$anon$2.apply(CompilerCache.scala:50)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:28)
at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.apply$mcV$sp(AggressiveCompile.scala:71)
at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:71)
at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:71)
at sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:101)
at sbt.compiler.AggressiveCompile$$anonfun$4.compileScala$1(AggressiveCompile.scala:70)
at sbt.compiler.AggressiveCompile$$anonfun$4.apply(AggressiveCompile.scala:88)
at sbt.compiler.AggressiveCompile$$anonfun$4.apply(AggressiveCompile.scala:60)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:24)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:22)
at sbt.inc.Incremental$.cycle(Incremental.scala:45)
at sbt.inc.Incremental$.compile(Incremental.scala:29)
at sbt.inc.IncrementalCompile$.apply(Compile.scala:20)
at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:96)
at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:44)
at com.typesafe.zinc.Compiler.compile(Compiler.scala:158)
at com.typesafe.zinc.Compiler.compile(Compiler.scala:142)
at com.excilys.ebi.gatling.app.ZincCompiler$.apply(ZincCompiler.scala:104)
at com.excilys.ebi.gatling.app.SimulationClassLoader$.fromSourcesDirectory(SimulationClassLoader.scala:34)
at com.excilys.ebi.gatling.app.Gatling$$anonfun$11.apply(Gatling.scala:88)
at com.excilys.ebi.gatling.app.Gatling$$anonfun$11.apply(Gatling.scala:88)
at scala.Option.getOrElse(Option.scala:108)
at com.excilys.ebi.gatling.app.Gatling.start(Gatling.scala:88)
at com.excilys.ebi.gatling.app.Gatling$.fromMap(Gatling.scala:54)
at com.excilys.ebi.gatling.app.Gatling$.runGatling(Gatling.scala:73)
at com.excilys.ebi.gatling.app.Gatling$.main(Gatling.scala:49)
at com.excilys.ebi.gatling.app.Gatling.main(Gatling.scala)
Press any key to continue . . .

I also have a gatling project which I try to run with the maven-gatling plugin. When I run mvn gatling:execute, I get the exact same ClassNotFoundException: xsbt.CompilerInterface.

The jar-file compiler-interface-0.12.2-sources.jar is located both in $GATLING_HOME/lib-folder and in my local .m2-folder.

I’m sitting on a Windows 7 computer with Java version 1.6.0_37. I’ve also tried to run gatling with Java version 1.7.0_05.

Any ideas on why I get this error message?

Hi,

There's a .zinc folder in your home. Could you delete it and try again,
please?

Cheers,

Stéphane

Thank you for the quick response! Now both gatling (standalone version) and the maven-plugin works like a charm!

kl. 13:50:53 UTC+2 mandag 6. mai 2013 skrev Stéphane Landelle følgende:

Glad to hear.

Zinc stores a cached copy of this jar here (don’t ask me why) and it seems it somehow ended up corrupted.

Have fun!