I built my first Gatling test and am using the gatling-maven-plugin to run it. On my laptop, I am using Maven 3.0.4 and everything runs just fine. I recently moved it to another machine with Maven 3.3.1 installed and it fails with the following error:
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: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at io.gatling.compiler.ZincCompiler$delayedInit$body.apply(ZincCompiler.scala:39) 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.ClassNotFoundException: org.slf4j.LoggerFactory at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 16 more
My local .m2 repository folder has the dependency so I know it was downloaded. I even tried adding it explicitly to the dependencies so it was more than just a transitive dependency, but no luck. Has anyone else run into this issue? Any ideas? In the mean time I’ve reverted back to the older version of Maven, but wanted to point this out in case it isn’t just user error on my part
Thanks,
Matt