# scala.NotImplementedError with Gatling+MQTT+Maven

**URL:** <https://community.gatling.io/t/scala-notimplementederror-with-gatling-mqtt-maven/5425>\
**Category:** Gatling (Open-Source)\
**Created:** [January 3, 2020, 2:00pm UTC](https://community.gatling.io/t/scala-notimplementederror-with-gatling-mqtt-maven/5425 "2020-01-03T14:00:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michal\_Baczewski](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Michal\_Baczewski](https://community.gatling.io/u/Michal_Baczewski)\
**Post date:** [January 3, 2020, 2:00pm UTC](https://community.gatling.io/t/scala-notimplementederror-with-gatling-mqtt-maven/5425/1 "2020-01-03T14:00:23Z")

</div>

Hello,

I’m trying to do a MQTT load test with gatling-mqtt plugin. Normally I’m a Java developer that’s why I used the Maven with IntelliJ IDE. The app throws an error “scala.NotImplementedError”. Desc:

1. I started from Gatling @slandelle example and it works fine: [GitHub - gatling/gatling-maven-plugin-demo: Showcase of the Gatling Plugin for Maven](https://github.com/gatling/gatling-maven-plugin-demo)
2. After adding gatling-mqtt and and performing several configurations compilation fail with scala.NotImplementedError.

**Stack trace:**

`[INFO] --- gatling-maven-plugin:3.0.5:test (default-cli) @ xyz-load-tests --- 14:40:57.590 [ERROR] i.g.a.Gatling$ - Run crashed scala.NotImplementedError: an implementation is missing at scala.Predef$.$qmark$qmark$qmark(Predef.scala:288) at io.gatling.mqtt.check.MqttCheckSupport.$init$(MqttCheckSupport.scala:38) at io.gatling.mqtt.Predef$.<init>(Predef.scala:28) at io.gatling.mqtt.Predef$.<clinit>(Predef.scala) at eu.xyz.tests.load.MqttStressSimulation.<init>(MqttStressSimulation.scala:10) ... 16 common frames omitted Wrapped by: java.lang.reflect.InvocationTargetException: null at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 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.app.Gatling$.main(Gatling.scala:38) at io.gatling.app.Gatling.main(Gatling.scala) 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:498) at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50) at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33) 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:498) at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50) at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 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.app.Gatling$.main(Gatling.scala:38) at io.gatling.app.Gatling.main(Gatling.scala) ... 6 more Caused by: scala.NotImplementedError: an implementation is missing at scala.Predef$.$qmark$qmark$qmark(Predef.scala:288) at io.gatling.mqtt.check.MqttCheckSupport.$init$(MqttCheckSupport.scala:38) at io.gatling.mqtt.Predef$.<init>(Predef.scala:28) at io.gatling.mqtt.Predef$.<clinit>(Predef.scala) at eu.xyz.tests.load.MqttStressSimulation.<init>(MqttStressSimulation.scala:10) ... 16 more`

**pom.xml**  
  
**`**

**\<?xml version="1.0" encoding="UTF-8"?\>**

4.0.0

org.example  
xyz-load-tests  
1.0-SNAPSHOT

3.3.1 3.0.5 3.2.0 4.3.0 3.0.4 io.gatling.highcharts gatling-charts-highcharts ${gatling.version} test io.gatling gatling-app ${gatling.version} io.gatling gatling-recorder ${gatling.version} io.gatling gatling-mqtt ${gatling.version} ${project.basedir}/src/test/scala maven-jar-plugin ${maven-jar-plugin.version} net.alchim31.maven scala-maven-plugin ${scala-maven-plugin.version} testCompile -Xss100M -target:jvm-1.8 -deprecation -feature -unchecked -language:implicitConversions -language:postfixOps io.gatling gatling-maven-plugin ${gatling-plugin.version} ` \*\*MqttStressSimulation:\*\* **` package eu.xyz.tests.load**

import scala.concurrent.duration.\_

import io.gatling.core.Predef.\_  
import io.gatling.mqtt.Predef.\_

class MqttStressSimulation extends Simulation {

private val mqttConf = mqtt  
.broker(“localhost”, 1305)

private val scn = scenario(“MQTT Test”)  
.exec(mqtt(“Connecting”).connect)  
.exec(  
mqtt(“Publishing”)  
.publish(“drill/ABC-001/engine/temperature/1”)  
.message(StringBody(“99”))  
.expect(100 milliseconds)  
)  
.exec(waitForMessages.timeout(100 milliseconds))

**setUp(scn.inject(atOnceUsers(1))).protocols(mqttConf);  
}  
`**  
   
Others: Engine, IDEPathHelper, Recorder(except simulationPackage) remained the same as in the example.

**Does anyone have an idea where the problem might be?**

Best regards, Michal B.

 ![2020-01-03_1450_gatling-mqtt-issue.png](https://europe1.discourse-cdn.com/flex013/uploads/gatling2/original/1X/6174cb51b02925352bf60c7bad942395a1fab8ab.png)

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [January 3, 2020, 2:57pm UTC](https://community.gatling.io/t/scala-notimplementederror-with-gatling-mqtt-maven/5425/2 "2020-01-03T14:57:54Z")

</div>

As stated at the top of the [Gatling MQTT documentation](https://gatling.io/docs/current/mqtt/):

MQTT support is only available in [FrontLine](https://gatling.io/gatling-frontline/).

You can compile locally, but you can only run on FrontLine.

---

<div class="post-metadata">

**Author:** ![Michal\_Baczewski](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Michal\_Baczewski](https://community.gatling.io/u/Michal_Baczewski)\
**Post date:** [January 3, 2020, 8:47pm UTC](https://community.gatling.io/t/scala-notimplementederror-with-gatling-mqtt-maven/5425/3 "2020-01-03T20:47:57Z")

</div>

Thanks for your reply. The answer sped up my work.

Best regards, Michal B.

W dniu piątek, 3 stycznia 2020 15:58:27 UTC+1 użytkownik Stéphane Landelle napisał:
