Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Native reflection configuration for brave.kafka.clients.TracingProducer is missing #1138

Closed
matus753 opened this issue Oct 6, 2021 · 5 comments
Assignees
Labels
type: compatibility Native image compatibility issue
Milestone

Comments

@matus753
Copy link

matus753 commented Oct 6, 2021

Hi,

I was trying to use spring-native on our microservice which simply read avro data from on kafka topic and send it to another kafka topic as json, using spring-cloud-stream and functional approach
Due to distributed tracing we are using spring-cloud-starter-sleuth too which should be supported, as is written in your documentation
After a lot of troubles I finally successfully built native image, but I am not able to start it
At first I've got a weird error:
Native reflection configuration for java.util.LinkedHashMap.<init> is missing
I do not uderstand why there was not created native reflection for this by spring-native but I solve this by type hint:
@TypeHint(typeNames = "java.util.LinkedHashMap", methods = @MethodHint(name = "<init>"))
I just end up with another error (this one I can at least point at something):
Native reflection configuration for brave.kafka.clients.TracingProducer is missing
Brave is used by spring-cloud-starter-sleuth which you claimed is supported, but it look like it has a problem when it should work with Kafka.
Shouldn't be this handled by spring native? I was expecting that I will need to use TypeHint annotation only in case of some custom implementations.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 6, 2021
@matus753 matus753 changed the title Native reflection configuration for brave.kafka.clients.TraxingProducer is missing Native reflection configuration for brave.kafka.clients.TracingProducer is missing Oct 8, 2021
@sdeleuze
Copy link
Contributor

sdeleuze commented Nov 3, 2021

Could you please share a sample project to allow us to refine the support?

@sdeleuze sdeleuze added the status: waiting-for-feedback We need additional information before we can continue label Nov 3, 2021
@matus753
Copy link
Author

matus753 commented Nov 3, 2021

Hi,

I am sending small dummy project to reproduce error:
dummy-app.zip

steps:
mvn -Pnative package
target/dummy-app

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Nov 3, 2021
@garyrussell
Copy link
Contributor

@sdeleuze I suggest assigning this to the spring-cloud-sleauth team

Native reflection configuration for brave.kafka.clients.TracingProducer is missing.

This class (and others) is a wrapper around the KafkaProducer class (from kafka-clients.jar) and has nothing to do with spring-kafka; the problem may also apply to use of Kafka clients with sleuth without using spring-kafka.

I also am not familiar with all the nuances of sleuth so it would be better for that team to address this, although I am happy to consult with them as needed.

Thanks.

@sdeleuze sdeleuze assigned OlgaMaciaszek and unassigned garyrussell Nov 5, 2021
@sdeleuze
Copy link
Contributor

sdeleuze commented Nov 5, 2021

@OlgaMaciaszek Could you please take care of this one?

@OlgaMaciaszek
Copy link
Contributor

Will do.

@OlgaMaciaszek OlgaMaciaszek added this to the 0.10.6 milestone Nov 5, 2021
@sdeleuze sdeleuze added type: compatibility Native image compatibility issue and removed status: waiting-for-triage An issue we've not yet triaged or decided on status: feedback-provided Feedback has been provided labels Nov 6, 2021
@sdeleuze sdeleuze closed this as completed Nov 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: compatibility Native image compatibility issue
Development

No branches or pull requests

5 participants