Gatling support sending Array[Byte] as message with custom protocol

28 views
Skip to first unread message

Gregory Melekh

unread,
Dec 26, 2016, 7:46:58 AM12/26/16
to Gatling User Group
Hello Gatling experts.
I use gatling 2.1.5 with custom UDP extension.
I need to send message as Array[Byte] via UDP connection.
When I do so , gatling throws following exception 


Simulation loadModel.ActivityManager started...
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.lang.ExceptionInInitializerError
at loadModel.ActivityManager.<init>(ActivityManager.scala:15)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:379)
at io.gatling.core.runner.Runner.run(Runner.scala:36)
at io.gatling.app.Gatling$$anonfun$runSimulationIfNecessary$1.apply(Gatling.scala:132)
at io.gatling.app.Gatling$$anonfun$runSimulationIfNecessary$1.apply(Gatling.scala:117)
at scala.Option.getOrElse(Option.scala:121)
at io.gatling.app.Gatling.runSimulationIfNecessary(Gatling.scala:117)
at io.gatling.app.Gatling.start(Gatling.scala:73)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:59)
at io.gatling.app.Gatling$.main(Gatling.scala:44)
at io.gatling.app.Gatling.main(Gatling.scala)
... 6 more
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to [B
at loadModel.Calamp3030And5000MessageType2$.<init>(Calamp3030And5000MessageType2.scala:52)
at loadModel.Calamp3030And5000MessageType2$.<clinit>(Calamp3030And5000MessageType2.scala)
... 21 more

(sending message as String works good for gatling ,but sends wrong data to the endpoint)


Is it possible ,gatling handles only String messages ?










Gregory Melekh

unread,
Jan 9, 2017, 8:21:33 AM1/9/17
to Gatling User Group
Can someone please direct me how to solve this problem?
Why Gatling cares, what kind of data has been sent?

Any help will be appreciated.
Reply all
Reply to author
Forward
0 new messages