Issue with Gatling Maven Plugin with Maven 3.3.1

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( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at io.gatling.mojo.MainWithArgsInFile.runMain( at io.gatling.mojo.MainWithArgsInFile.main( 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 at java.lang.ClassLoader.loadClass( at sun.misc.Launcher$AppClassLoader.loadClass( at java.lang.ClassLoader.loadClass( ... 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 :slight_smile:


Are you willing to bet a beer that the slf4j-api jar is corrupted in your local repository?

Good thought, but doesn’t seem to be the case. I deleted the local slf4j dependencies and re-ran Maven 3.3.1. It downloaded fresh copies and still failed with the above error. I am able to run the test successfully with Maven 3.2.5 and Maven 3.0.4 on the same machine.

Broken maven downloads the root cause of 99,9% of such issues. I still fail to see what those checksums are for?!

But here, there’s an undocumented change in maven 3.3.

I’ve fixed it a few hours ago:


Awesome! Thanks for the quick action.

BTW, I like IPA’s :wink:

You’ll have to drop by Paris, France :wink:

Hi Everyone!

Please help in writing a scenario in which I want to extract two parameters from the response url.
I also want this variable to be stored in my session object and use it in future.

Here is an example:

.exec(http(“my post”)
.check(WHAT to write here to extract data from URL and save it in session variable).saveas(“Tokem1”)


Please help in writing the .scala file for above scenario?


  • don’t highjack an existing unrelated thread
  • read the documentation first