Skip to content

Spring boot messaging Failed to serialize object caused by jaeger #320

@AhHa45

Description

@AhHa45

I spent now 2 days trying to figure out how to solve this but I am out of luck..

We added java-spring-cloud-starter version 0.5.9 to our spring boot application v2.1.3

We have some DomainEvents that we need to serialize, we use MessageChannel of spring boot framework.
which creates a GenericMessage
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/messaging/Message.html

Here is a snippet from our implementation
https://pastebin.com/n1ygDxhW

What I found out is that jaeger is adding something to this GenericMessage (see the stack trace below)
I don't know how to solve this issue and for me it looks like a bug...can anyone help me out? I could find anything in the interwebs.

org.springframework.messaging.MessageDeliveryException: failed to send Message to channel 'userEventGatewayInputChannel'; nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to serialize object using JacksonMessageSerialization; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class java.lang.Object and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: org.springframework.messaging.support.GenericMessage["headers"]-> java.util.HashMap["io.opentracing.contrib.spring.integration.messaging.OpenTracingChannelInterceptor.SCOPE"]-> io.opentracing.util.ThreadLocalScope["wrapped"]->io.jaegertracing.internal.JaegerSpan["tracer"]->io.jaegertracing.internal.JaegerTracer["reporter"]->io.jaegertracing.internal.reporters.CompositeReporter["reporters"]->java.util.ArrayList[0]->io.jaegertracing.internal.reporters.RemoteReporter["sender"]->io.jaegertracing.thrift.internal.senders.UdpSender["agentClient"]->io.jaegertracing.agent.thrift.Agent$Client["iprot_"]->org.apache.thrift.protocol.TCompactProtocol["trans_"]->io.jaegertracing.thrift.internal.reporters.protocols.ThriftUdpTransport["socket"]->java.net.DatagramSocket["closeLock"])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions