Exception in thread "main" java.lang.AbstractMethodError: Method is abstract

Hi all,

Hoping this is a simple question and I’m overlooking something (I’ve not been able to find a post describing this so far though).

Simply, I’m following this tutorial:

https://www.baeldung.com/introduction-to-gatling

I’ve created a Gatling archetype, and opened it in to IntelliJ. I’ve added Framework Support for Scala, and got the basic archetype compiling. The next step of the tutorial is to run Engine.scala from my IDE. When I attempt this, I get the message:

Exception in thread "main" java.lang.AbstractMethodError: Method Engine$.scala$App$_setter_$executionStart_$eq(J)V is abstract at Engine$.scala$App$_setter_$executionStart_$eq(Engine.scala) at scala.App$class.$init$(App.scala:44) at Engine$.<init>(Engine.scala:4) at Engine$.<clinit>(Engine.scala) at Engine.main(Engine.scala)

I’m using Java 8, so I thought that would be adequate.

Any ideas what I might have done wrong?

Cheers.

We collaborate with clients to create not just the best software, but the right software. On time. On budget. On your terms. With Black Pepper it’s your software, your way.

Black Pepper Software Limited, registered in England and Wales. Registered number: 03763392. Registered office: Warwick House, 32 Clarendon Street, Leamington Spa, Warwickshire CV32 4PG

No idea. Maybe you tried to force Scala 2.13 while Gatling requires Scala 2.12?

Hi Stéphane!

Thanks for responding. I should have mentioned, I’m using scala-sdk 2.11.0.

Should Gatling work with that version?

Worth mentioning that the original post references the wrong file to run (I’ve shown an error for Engine.scala instead of Recorder.scala). The same issue is present in both files. Here’s the error for Recorder.scala :

`

Exception in thread “main” java.lang.AbstractMethodError: Method Recorder$.scala$App$setter$executionStart_$eq(J)V is abstract
at Recorder$.scala$App$setter$executionStart_$eq(Recorder.scala)
at scala.App$class.$init$(App.scala:44)
at Recorder$.(Recorder.scala:4)
at Recorder$.(Recorder.scala)
at Recorder.main(Recorder.scala)

`

We collaborate with clients to create not just the best software, but the right software. On time. On budget. On your terms. With Black Pepper it’s your software, your way.

Black Pepper Software Limited, registered in England and Wales. Registered number: 03763392. Registered office: Warwick House, 32 Clarendon Street, Leamington Spa, Warwickshire CV32 4PG

Modern versions of Gatling require Scala 2.12 and are not compatible with Scala 2.11.

That’s worked perfectly, I updated to 2.12 (IntelliJ had brought in 2.11 by default), and now everything is good again!

Thanks so much, I’m looking forward to experimenting with this now!