# Unable to run MQTT script

**URL:** <https://community.gatling.io/t/unable-to-run-mqtt-script/6170>\
**Category:** Gatling (Open-Source)\
**Created:** [June 30, 2021, 11:46am UTC](https://community.gatling.io/t/unable-to-run-mqtt-script/6170 "2021-06-30T11:46:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![saipushpak\_polepalle](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@saipushpak\_polepalle](https://community.gatling.io/u/saipushpak_polepalle)\
**Post date:** [June 30, 2021, 11:46am UTC](https://community.gatling.io/t/unable-to-run-mqtt-script/6170/1 "2021-06-30T11:46:47Z")

</div>

Getting the following error when trying to run a MQTT protocol script. Can some one help me out

17:13:48.394 [ERROR] i.g.a.Gatling$ - Run crashed  
java.lang.ClassNotFoundException: scala.Serializable  
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)  
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)  
… 24 common frames omitted  
Wrapped by: java.lang.NoClassDefFoundError: scala/Serializable  
at java.lang.ClassLoader.defineClass1(Native Method)  
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)  
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)  
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)  
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)  
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)  
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)  
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)  
at com.github.mnogu.gatling.mqtt.test.MqttSimulation.(MqttSimulation.scala:10)  
… 10 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:62)  
at io.gatling.app.Runner.run(Runner.scala:49)  
at io.gatling.app.Gatling$.start(Gatling.scala:83)  
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:45)  
at io.gatling.app.Gatling$.main(Gatling.scala:37)  
at io.gatling.app.Gatling.main(Gatling.scala)  
Exception in thread “main” 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:62)  
at io.gatling.app.Runner.run(Runner.scala:49)  
at io.gatling.app.Gatling$.start(Gatling.scala:83)  
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:45)  
at io.gatling.app.Gatling$.main(Gatling.scala:37)  
at io.gatling.app.Gatling.main(Gatling.scala)  
Caused by: java.lang.NoClassDefFoundError: scala/Serializable  
at java.lang.ClassLoader.defineClass1(Native Method)  
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)  
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)  
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)  
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)  
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)  
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)  
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)  
at com.github.mnogu.gatling.mqtt.test.MqttSimulation.(MqttSimulation.scala:10)  
… 10 more  
Caused by: java.lang.ClassNotFoundException: scala.Serializable  
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)  
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)  
… 24 more

---

<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:** [June 30, 2021, 11:51am UTC](https://community.gatling.io/t/unable-to-run-mqtt-script/6170/2 "2021-06-30T11:51:31Z")

</div>

You’re mixing different incompatible Scala versions, eg trying to use Gatling 3.6 (using Scala 2.13) and a third party plugin compiled against Scala 2.12.  
You’ll have to either upgrade the plugin or downgrade Gatling.

---

<div class="post-metadata">

**Author:** ![saipushpak\_polepalle](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@saipushpak\_polepalle](https://community.gatling.io/u/saipushpak_polepalle)\
**Post date:** [June 30, 2021, 2:10pm UTC](https://community.gatling.io/t/unable-to-run-mqtt-script/6170/3 "2021-06-30T14:10:41Z")

</div>

I have tried to create the mqtt plugin using the latest version of scala & sbt but i couldn’t install. It is throwing error when i use the following command sudo dpkg -i scala. 2.13.6.deb

---

<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:** [June 30, 2021, 2:14pm UTC](https://community.gatling.io/t/unable-to-run-mqtt-script/6170/4 "2021-06-30T14:14:53Z")

</div>

Gatling has an official MQTT support that’s only available for [Gatling Enterprise](https://gatling.io/docs/enterprise) customers.

If you’re using a third party MQTT plugin, it’s not supported here. If you have any issue with it, you have to reach out to its authors, typically on their GitHub project.

---

<div class="post-metadata">

**Author:** ![kishoreag31](https://avatars.discourse-cdn.com/v4/letter/k/b4bc9f/32.png) [@kishoreag31](https://community.gatling.io/u/kishoreag31)\
**Post date:** [February 22, 2023, 11:30am UTC](https://community.gatling.io/t/unable-to-run-mqtt-script/6170/5 "2023-02-22T11:30:51Z")

</div>

Hi I getting same my gatlings simulation runs. versions used in my project  
gatling.version =3.9.0  
gatling-maven-plugin.version=4.2.7  
scala-maven-plugin.version=4.7.1  
scala-library= 2.13.10

Am i using any incorrect versions here?

---

<div class="post-metadata">

**Author:** ![GatlingPete](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/gatlingpete/32/1167_2.png) [@GatlingPete](https://community.gatling.io/u/GatlingPete)\
**Post date:** [February 22, 2023, 12:56pm UTC](https://community.gatling.io/t/unable-to-run-mqtt-script/6170/6 "2023-02-22T12:56:57Z")

</div>

Hey there, thanks for reaching out again.

If you’re also using this com.github.mnogu MQTT plugin, it’s a third party plugin that is no longer maintained and doesn’t work anymore. You can see a full list of the currently maintained 3rd party plugins in our documentation: [Gatling - Third Party Plugins](https://gatling.io/docs/gatling/reference/current/extensions/third_parties/)

We do have an official and Gatling supported MQTT plugin, however it’s only available to Gatling Enterprise customers (Cloud or On-prem). If you’re interested I could set you up with a demo.

All the best,  
Pete
