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

Kafka Streams and Jackson Serialization results in CodecException when calling Health endpoint #1026

Open
JacksonFraser opened this issue May 6, 2024 · 2 comments

Comments

@JacksonFraser
Copy link

Expected Behavior

The health endpoint returns health status and health details

Actual Behaviour

An exception: Unexpected error occurred: Error encoding object [io.micronaut.management.health.indicator.DefaultHealthResult@69164ed1] to JSON: No serializable introspection present for type TaskId. Consider adding Serdeable. Serializable annotate to type TaskId. Alternatively if you are not in control of the project's source code, you can use @SerdeImport(TaskId.class) to enable serialization of this type. io.micronaut.http.codec.CodecException: Error encoding object [io.micronaut.management.health.indicator.DefaultHealthResult@69164ed1] to JSON: No serializable introspection present for type TaskId. Consider adding Serdeable. Serializable annotate to type TaskId. Alternatively if you are not in control of the project's source code, you can use @SerdeImport(TaskId.class) to enable serialization of this type.

Steps To Reproduce

  1. Run git clone git@github.com:JacksonFraser/health-demo.git && cd health-demo && ./gradlew run
  2. Open new terminal window
  3. Run curl http://localhost:8081/health

Environment Information

  • Operating System: Ubuntu 22.04.4 LTS
  • JDK: openjdk 17.0.7 2023-04-18 LTS

Example Application

https://github.com/JacksonFraser/health-demo

Version

4.0.4

@JacksonFraser
Copy link
Author

The workaround of adding @SerdeImport(TaskId.class) resolves the issue. However, I believe this needs to be fixed regardless

@tmellanxt
Copy link

We are facing the same issue, we face the issue when upgrading io.micronaut.kafka:micronaut-kafka to the latest version (5.4.0). Version 4.5.5 seems not include the bug.

Not sure where the bug originates from but perhaps the bug would be best reported in the kafka project: https://github.com/micronaut-projects/micronaut-kafka/issues

@sdelamo sdelamo transferred this issue from micronaut-projects/micronaut-core May 8, 2024
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