java.lang.ClassNotFoundException: io.gatling.core.controller.inject.MetaInjectionProfile

It’s the strangest thing: I modified my gatling-common project to enable doing the step injection model (incrementConcurrentUsers). I built it. Released it. Consumed it in my project. The project compiles. But when I try to run it, I get the following error:

14:02:02.806 [TRACE] i.g.a.Gatling$ - Starting
14:02:02.813 [INFO ] i.g.c.c.GatlingConfiguration$ - Gatling will try to use ‘gatling.conf’ as custom config file.
14:02:02.965 [TRACE] i.g.a.Gatling$ - Configuration loaded
14:02:03.213 [INFO ] a.e.s.Slf4jLogger - Slf4jLogger started
14:02:03.431 [TRACE] i.g.a.Gatling$ - ActorSystem instantiated
14:02:03.432 [TRACE] i.g.a.Gatling$ - Runner instantiated
14:02:03.433 [TRACE] i.g.app.Runner - Running
14:02:03.457 [ERROR] i.g.a.Gatling$ - Run crashed
java.lang.ClassNotFoundException: io.gatling.core.controller.inject.MetaInjectionProfile
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)

=> fat java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
… 15 common frames omitted
Wrapped by: java.lang.NoClassDefFoundError: io/gatling/core/controller/inject/MetaInjectionProfile
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.getDeclaredConstructor(Class.java:2178)
at io.gatling.app.Runner.run0(Runner.scala:74)
at io.gatling.app.Runner.run(Runner.scala:60)
at io.gatling.app.Gatling$.start(Gatling.scala:80)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:46)
at io.gatling.sbt.GatlingTask.liftedTree1$1(GatlingTask.scala:52)
at io.gatling.sbt.GatlingTask.execute(GatlingTask.scala:51)
at sbt.ForkMain$Run.lambda$runTest$1(ForkMain.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[error] Uncaught exception when running org.finra.fip.auth.isolation.LoginInteractive_EWS_Closed: java.lang.NoClassDefFoundError: io/gatling/core/controller/inject/MetaInjectionProfile
[error] sbt.ForkMain$ForkError: java.lang.NoClassDefFoundError: io/gatling/core/controller/inject/MetaInjectionProfile

I am seeing this with Gatling 3.3.0 and 3.3.1

Using FrontLine 1.8 instead of 1.9? If so, you have to stick with Gatling 3.2.

FrontLine Version: 1.9.0
Gatling Version: 3.3.0.FL

Also, in plugins.sbt:

resolvers += Resolver.bintrayIvyRepo( "gatling", "sbt-plugins" )

addSbtPlugin("io.gatling" % "gatling-sbt" % "3.1.0")
addSbtPlugin("io.gatling.frontline" % "sbt-frontline" % "1.1.0")

Your gatling-common is compiled against 3.2.1: https://github.com/JohnArrowwood/gatling-common/blob/master/build.sbt#L24-L25
MetaInjectionProfile was dropped in 3.3.0, see https://github.com/gatling/gatling/issues/3804

Indeed! I love it when it’s an easy fix.