Gatling-MQTT-Protocol

Hi,
I am trying to perform “sbt assembly” but getting below error. I have just cloned “GitHub - jeanadrien/gatling-mqtt-protocol: Unofficial MQTT plugin for Gatling load testing framework” this and trying to create jar. Can someone help.

[warn] Executing in batch mode.
[warn]   For better performance, hit [ENTER] to switch to interactive mode, or
[warn]   consider launching sbt without any commands, or explicitly passing 'shell'
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by sbt.TrapExit$ (file:/C:/Users/ALenka1/.sbt/boot/scala-2.10.6/org.scala-sbt/sbt/0.13.15/run-0.13.15.jar)
WARNING: Please consider reporting this to the maintainers of sbt.TrapExit$
WARNING: System::setSecurityManager will be removed in a future release
[info] Loading project definition from C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\project
error: error while loading String, class file 'C:\Users\ALenka1\.sbt\1.0\java9-rt-ext-openlogic_17_0_11\rt.jar(java/lang/String.class)' is broken
(class java.lang.NullPointerException/Cannot invoke "scala.tools.nsc.Global$Run.typerPhase()" because the return value of "scala.tools.nsc.Global.currentRun()" is null)
[info] Set current project to gatling-mqtt-protocol (in build file:/C:/Users/ALenka1/OneDrive%20-%20Rockwell%20Automation,%20Inc/Documents/jeanadrien/gatling-mqtt-protocol/)
[info] Updating {file:/C:/Users/ALenka1/OneDrive%20-%20Rockwell%20Automation,%20Inc/Documents/jeanadrien/gatling-mqtt-protocol/}root...
[info] Resolving net.java.dev.jna#jna;5.13.0 ...
[info] downloading https://repo1.maven.org/maven2/io/gatling/gatling-test-framework/3.6.1/gatling-test-framework-3.6.1.jar ...
[info]  [SUCCESSFUL ] io.gatling#gatling-test-framework;3.6.1!gatling-test-framework.jar (852ms)
[info] Done updating.
[info] Compiling 29 Scala sources to C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\target\scala-2.13\classes...
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\ConnectAction.scala:6: object ClockSingleton is not a member of package io.gatling.commons.util
[error] import io.gatling.commons.util.ClockSingleton._
[error]                                ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\MqttAction.scala:4: object ClockSingleton is not a member of package io.gatling.commons.util
[error] import io.gatling.commons.util.ClockSingleton._
[error]                                ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\ConnectAction.scala:38: not found: value nowMillis
[error]         val requestStartDate = nowMillis
[error]                                ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\MqttAction.scala:21: io.gatling.core.stats.message.ResponseTimings.type does not take parameters
[error]         ResponseTimings(startTimestamp = requestStartDate, endTimestamp = nowMillis)
[error]                        ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\ConnectAction.scala:43: not enough arguments for method logResponse: (scenario: String, groups: List[String], requestName: String, startTimestamp: Long, endTimestamp: Long, status: io.gatling.commons.stats.Status, responseCode: Option[String], message: Option[String]): Unit.
[error] Unspecified value parameters responseCode, message.
[error]                     statsEngine.logResponse(
[error]                                            ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\ConnectAction.scala:58: not enough arguments for method logResponse: (scenario: String, groups: List[String], requestName: String, startTimestamp: Long, endTimestamp: Long, status: io.gatling.commons.stats.Status, responseCode: Option[String], message: Option[String]): Unit.
[error] Unspecified value parameters responseCode, message.
[error]                     statsEngine.logResponse(
[error]                                            ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\ConnectAction.scala:37: postfix operator minute needs to be enabled
[error] by making the implicit value scala.language.postfixOps visible.
[error] ----
[error] This can be achieved by adding the import clause 'import scala.language.postfixOps'
[error] or by setting the compiler option -language:postfixOps.
[error] See the Scaladoc for value scala.language.postfixOps for a discussion
[error] why the feature needs to be explicitly enabled.
[error]             implicit val timeout = Timeout(1 minute) // TODO check how to configure this
[error]                                              ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\protocol\MqttProtocol.scala:19: trait ProtocolKey takes type parameters
[error]     val MqttProtocolKey = new ProtocolKey {
[error]                               ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\PayloadComparison.scala:8: value deep is not a member of Array[Byte]
[error]     val sameBytesContent : Array[Byte] => Array[Byte] => Boolean = (a => b => a.deep == b.deep)
[error]                                                                                 ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\PayloadComparison.scala:8: value deep is not a member of Array[Byte]
[error]     val sameBytesContent : Array[Byte] => Array[Byte] => Boolean = (a => b => a.deep == b.deep)
[error]                                                                                           ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\PublishAction.scala:10: object ClockSingleton is not a member of package io.gatling.commons.util
[error] import io.gatling.commons.util.ClockSingleton._
[error]                                ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\PublishAction.scala:43: not found: value nowMillis
[error]         val requestStartDate = nowMillis
[error]                                ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\PublishAction.scala:55: not enough arguments for method logResponse: (scenario: String, groups: List[String], requestName: String, startTimestamp: Long, endTimestamp: Long, status: io.gatling.commons.stats.Status, responseCode: Option[String], message: Option[String]): Unit.
[error] Unspecified value parameters responseCode, message.
[error]                 statsEngine.logResponse(
[error]                                        ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\PublishAction.scala:68: not enough arguments for method logResponse: (scenario: String, groups: List[String], requestName: String, startTimestamp: Long, endTimestamp: Long, status: io.gatling.commons.stats.Status, responseCode: Option[String], message: Option[String]): Unit.
[error] Unspecified value parameters responseCode, message.
[error]                 statsEngine.logResponse(
[error]                                        ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\PublishAction.scala:41: postfix operator minute needs to be enabled
[error] by making the implicit value scala.language.postfixOps visible.
[error]         implicit val timeout = Timeout(1 minute) // TODO check how to configure this
[error]                                          ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\PublishAndWaitAction.scala:10: object ClockSingleton is not a member of package io.gatling.commons.util
[error] import io.gatling.commons.util.ClockSingleton._
[error]                                ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\PublishAndWaitAction.scala:46: not found: value nowMillis
[error]         val requestStartDate = nowMillis
[error]                                ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\PublishAndWaitAction.scala:64: not enough arguments for method logResponse: (scenario: String, groups: List[String], requestName: String, startTimestamp: Long, endTimestamp: Long, status: io.gatling.commons.stats.Status, responseCode: Option[String], message: Option[String]): Unit.
[error] Unspecified value parameters responseCode, message.
[error]                 statsEngine.logResponse(
[error]                                        ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\PublishAndWaitAction.scala:77: not enough arguments for method logResponse: (scenario: String, groups: List[String], requestName: String, startTimestamp: Long, endTimestamp: Long, status: io.gatling.commons.stats.Status, responseCode: Option[String], message: Option[String]): Unit.
[error] Unspecified value parameters responseCode, message.
[error]                 statsEngine.logResponse(
[error]                                        ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\PublishAndWaitActionBuilder.scala:22: postfix operator seconds needs to be enabled
[error] by making the implicit value scala.language.postfixOps visible.
[error]     timeout         : FiniteDuration = 60 seconds
[error]                                           ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\SubscribeAction.scala:10: object ClockSingleton is not a member of package io.gatling.commons.util
[error] import io.gatling.commons.util.ClockSingleton._
[error]                                ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\SubscribeAction.scala:39: not found: value nowMillis
[error]         val requestStartDate = nowMillis
[error]                                ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\SubscribeAction.scala:48: not enough arguments for method logResponse: (scenario: String, groups: List[String], requestName: String, startTimestamp: Long, endTimestamp: Long, status: io.gatling.commons.stats.Status, responseCode: Option[String], message: Option[String]): Unit.
[error] Unspecified value parameters responseCode, message.
[error]                 statsEngine.logResponse(
[error]                                        ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\SubscribeAction.scala:62: not enough arguments for method logResponse: (scenario: String, groups: List[String], requestName: String, startTimestamp: Long, endTimestamp: Long, status: io.gatling.commons.stats.Status, responseCode: Option[String], message: Option[String]): Unit.
[error] Unspecified value parameters responseCode, message.
[error]                 statsEngine.logResponse(
[error]                                        ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\SubscribeAction.scala:37: postfix operator minute needs to be enabled
[error] by making the implicit value scala.language.postfixOps visible.
[error]         implicit val timeout = Timeout(1 minute) // TODO check how to configure this
[error]                                          ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\actions\WaitForMessagesActionBuilder.scala:13: postfix operator seconds needs to be enabled
[error] by making the implicit value scala.language.postfixOps visible.
[error]     timeout : FiniteDuration = 60 seconds
[error]                                   ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\client\MqttClient.scala:80: postfix operator minute needs to be enabled
[error] by making the implicit value scala.language.postfixOps visible.
[error]         implicit val timeout = Timeout(1 minute)
[error]                                          ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\client\MqttClient.scala:135: postfix operator milliseconds needs to be enabled
[error] by making the implicit value scala.language.postfixOps visible.
[error]                 system.scheduler.scheduleOnce(1 milliseconds, self, msg)
[error]                                                 ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\client\PahoConnectionListener.scala:5: object client is not a member of package org.eclipse.paho
[error] import org.eclipse.paho.client.mqttv3.{IMqttDeliveryToken, MqttCallback, MqttMessage}
[error]                         ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\client\PahoConnectionListener.scala:10: not found: type MqttCallback
[error] class PahoConnectionListener(actor : ActorRef) extends MqttCallback with LazyLogging {
[error]                                                        ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\client\PahoConnectionListener.scala:11: not found: type IMqttDeliveryToken
[error]     override def deliveryComplete(token : IMqttDeliveryToken) : Unit = {
[error]                                           ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\client\PahoConnectionListener.scala:16: not found: type MqttMessage
[error]         topic : String, message : MqttMessage
[error]                                   ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\client\PahoMqttClient.scala:6: object client is not a member of package org.eclipse.paho
[error] import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence
[error]                         ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\client\PahoMqttClient.scala:7: object client is not a member of package org.eclipse.paho
[error] import org.eclipse.paho.client.mqttv3.{MqttConnectOptions, MqttMessage, MqttClient => PahoClient}
[error]                         ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\client\PahoMqttClient.scala:14: not found: type MemoryPersistence
[error]     private val persistence = new MemoryPersistence();
[error]                                   ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\client\PahoMqttClient.scala:23: not found: value PahoClient
[error]     val clientId = config.clientId.getOrElse(PahoClient.generateClientId())
[error]                                              ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\client\PahoMqttClient.scala:24: not found: type PahoClient
[error]     val pahoClient = new PahoClient(broker, clientId, persistence)
[error]                          ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\client\PahoMqttClient.scala:26: not found: type MqttConnectOptions
[error]     val connOpts = new MqttConnectOptions
[error]                        ^
[error] C:\Users\ALenka1\OneDrive - Rockwell Automation, Inc\Documents\jeanadrien\gatling-mqtt-protocol\src\main\scala\com\github\jeanadrien\gatling\mqtt\client\PahoMqttClient.scala:71: not found: type MqttMessage
[error]         val message = new MqttMessage(payload)
[error]                           ^
[error] 39 errors found
[error] (compile:compileIncremental) Compilation failed
[error] Total time: 24 s, completed May 16, 2024, 8:30:50 PM

Hello,

As explained in its terms, this forum is dedicated to official Gatling components. You won’t find help on third party plugins here. Please instead reach out directly to the maintainers of this plugin, on their GitHub repository or StackOverflow.

If you’re looking for an official support for MQTT, you can use this plugin as part of a Gatling Enterprise subscription.

Regards