Exception in thread "main" java.lang.NoSuchMethodException: co.tala.performance.atlas.service.AuthenticationServiceSimulation.<init>() when using Guice dependency injection

I am using guice dependency injection in the simulation class because i need to inject a dependency from a library that i am using. The code looks like:

class AuthenticationServiceSimulation @Inject()(implicit val authenticator: Authenticator) extends Simulation {

  val authentication = new Authentication()

and the Authentication class is

@Singleton
class Authentication @Inject()(implicit val authenticator: Authenticator) extends BaseSimulation {

  val SERVICE_TOKEN_HEADER = "X-Service-Token" -> authenticator.authManager.buildServiceJwt()

the authenticator class is from the library i am using.

I am able to compile this code but when run, i get a compile time error

10:33:13.262 [main] ERROR io.gatling.app.Gatling$ - Run crashed
java.lang.NoSuchMethodException: co.tala.performance.atlas.service.AuthenticationServiceSimulation.()
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.getDeclaredConstructor(Class.java:2178)
at io.gatling.app.Runner.run0(Runner.scala:75)
at io.gatling.app.Runner.run(Runner.scala:61)
at io.gatling.app.Gatling$.start(Gatling.scala:74)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:47)
at io.gatling.app.Gatling$.main(Gatling.scala:39)
at io.gatling.app.Gatling.main(Gatling.scala)
Exception in thread “main” java.lang.NoSuchMethodException: co.tala.performance.atlas.service.AuthenticationServiceSimulation.()
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.getDeclaredConstructor(Class.java:2178)
at io.gatling.app.Runner.run0(Runner.scala:75)
at io.gatling.app.Runner.run(Runner.scala:61)
at io.gatling.app.Gatling$.start(Gatling.scala:74)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:47)
at io.gatling.app.Gatling$.main(Gatling.scala:39)
at io.gatling.app.Gatling.main(Gatling.scala)

i would like assistance with the above issue. Thank you in advance.

PS: i am using the lkishalmi gradle plugin

plugins {
    id 'com.github.lkishalmi.gatling' version '3.0.2'
}

I am using guice dependency injection in the simulation class

That won’t work.
Gatling is the one loading the Simulation, not some DI framework.
And it requires the parameterless constructor.

because i need to inject a dependency from a library that i am using.

A DI framework is just glue. Just instantiate your component in the Simulation body.