You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to send key of type integer and I use org.apache.kafka.common.serialization.IntegerSerializer, then I get error as specified below. I get an error like that for any serializer other than StringSerializer.
2023-11-17 10:24:48,346 ERROR o.a.j.t.JMeterThread: Error while processing sampler: 'Java Request'.
org.apache.kafka.common.errors.SerializationException: Can't convert key of class java.lang.String to class org.apache.kafka.common.serialization.IntegerSerializer specified in key.serializer at org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:940) ~[kloadgen-5.6.6.jar:?] at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:905) ~[kloadgen-5.6.6.jar:?] at com.sngular.kloadgen.sampler.KafkaProducerSampler.runTest(KafkaProducerSampler.java:159) ~[kloadgen-5.6.6.jar:?] at org.apache.jmeter.protocol.java.sampler.JavaSampler.sample(JavaSampler.java:197) ~[ApacheJMeter_java.jar:5.5] at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:651) ~[ApacheJMeter_core.jar:5.5] at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:570) ~[ApacheJMeter_core.jar:5.5] at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:501) ~[ApacheJMeter_core.jar:5.5] at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:268) ~[ApacheJMeter_core.jar:5.5] at java.lang.Thread.run(Thread.java:1623) ~[?:?]Caused by: java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Integer (java.lang.String and java.lang.Integer are in module java.base of loader 'bootstrap') at org.apache.kafka.common.serialization.IntegerSerializer.serialize(IntegerSerializer.java:19) ~[kloadgen-5.6.6.jar:?] at org.apache.kafka.common.serialization.Serializer.serialize(Serializer.java:62) ~[kloadgen-5.6.6.jar:?] at org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:937) ~[kloadgen-5.6.6.jar:?] ... 8 more2023-11-17 10:24:48,346 INFO o.a.j.t.JMeterThread: Thread is done: Thread Group 1-12023-11-17 10:24:48,346 INFO o.a.j.t.JMeterThread: Thread finished: Thread Group 1-12023-11-17 10:24:48,346 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test2023-11-17 10:24:48,346 INFO o.a.k.c.p.KafkaProducer: [Producer clientId=] Closing the Kafka producer with timeoutMillis = 9223372036854775807 ms.2023-11-17 10:24:48,348 INFO o.a.k.c.m.Metrics: Metrics scheduler closed2023-11-17 10:24:48,348 INFO o.a.k.c.m.Metrics: Closing reporter org.apache.kafka.common.metrics.JmxReporter2023-11-17 10:24:48,349 INFO o.a.k.c.m.Metrics: Metrics reporters closed2023-11-17 10:24:48,349 INFO o.a.k.c.u.AppInfoParser: App info kafka.producer for unregistered2023-11-17 10:24:48,349 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)
Have you added your JMX Testplan or a replica?
I have added a JMX testplan
Have you added your Schema or a replica?
I have added the Schema
The text was updated successfully, but these errors were encountered:
What happened?
When I try to send key of type integer and I use org.apache.kafka.common.serialization.IntegerSerializer, then I get error as specified below. I get an error like that for any serializer other than StringSerializer.
Simple Test Plan 2.zip
KloadGen Version
5.6.6
Relevant log output
Have you added your JMX Testplan or a replica?
Have you added your Schema or a replica?
The text was updated successfully, but these errors were encountered: