How to serialize message from kafka topic

i use axon with mongodb and kafka.
i recieved issue.

how to solve this?

---- Debugging information ----
cause-exception     :
cause-message       : org.apache.kafka.common.TopicPartition
class               : java.util.HashMap
required-type       : java.util.HashMap
converter-type      : com.thoughtworks.xstream.converters.collections.MapConverter
path                : /org.axonframework.extensions.kafka.eventhandling.consumer.streamable.KafkaTrackingToken/positions/m/entry/org.apache.kafka.common.TopicPartition
line number         : 1
class[1]            : java.util.Collections$UnmodifiableMap
required-type[1]    : java.util.Collections$UnmodifiableMap
converter-type[1]   : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
class[2]            : org.axonframework.extensions.kafka.eventhandling.consumer.streamable.KafkaTrackingToken
required-type[2]    : org.axonframework.extensions.kafka.eventhandling.consumer.streamable.KafkaTrackingToken
version             : 1.4.18

and if i use this

    general: jackson
    events: jackson
    messages: jackson

change error to org.axonframework.serialization.SerializationException: Error while deserializing object

Hi imnewone,

Could it be that the message is serialized in XML and the application expects Jackson? What happens if you remove the config for the general serializer (which means it will use Xstream).

I hope this helps,



It could also be an XStream security issue see java - - Stack Overflow