Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AhHa45 opened this issue Feb 26, 2021 · 1 comment
Open

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

AhHa45 opened this issue Feb 26, 2021 · 1 comment

Comments

@AhHa45
Copy link

AhHa45 commented Feb 26, 2021

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"])

@Shiftuia
Copy link

Shiftuia commented Feb 9, 2023

@AhHa45 did you found any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants