-
Notifications
You must be signed in to change notification settings - Fork 613
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
BindingsLifecycleController isolated ObjectMapper caused jsr310 error at /actuator/bindings endpoint for Duration of azure Service Bus bindings #2794
Comments
Do you have the following on your classpath?
|
Closing due to no activity. Feel free to re-open if there is a need. Otherwise, please follow the recommendation from @olegz above. |
@sobychacko I am comment the issue because I am having exactly the same problem but for the Eventhubs binder. I have opened an issue here but I am not sure if the problem is with Azure but with the ObjectMapper configured for the actuator. I have tried to configure it in several ways by extending the actuator but I still have the same problem. To reproduce it just follow the steps in the other issue. In the project that I give as an example in the issue, there is the dependency |
Replied #2272 (comment). |
Sorry, I missed the comment, yes I have the dependency jackson in my pom |
@sobychacko Any thoughts on this? @ferblaca provided a reproducer case and he said the project has already the j |
I will take a look today. First, I want to see if this is any binder-specific or a general issue. |
Hi @sobychacko, this only occurs for eventhubs binder. For example, the Kafka binder works correctly. The problem is that the ObjectMapper configured for the actuator bindings is not capable of serializing data of type Duration used for the eventhubs bindings, even with the jackson-datatype-jsr310 dependency at the classpath. |
As a workaround to the problem, can you create a custom
When you provide a custom See this SO thread for more details. If it works, we will incorporate this change into the framework. |
Hi @sobychacko , I have tested the workaround but the same problem remains. |
Fixes #2794 The custom ObjectMapper used in AMCB is unable to serialize java.time.Duration values. To fix this, the ObjectMapper needs to register the JavaTimeModule from the jackson-datatype-jsr310 libarary. Adding a test to verify the fix.
@ferblaca The binder runs in a child context, and that's the reason why you can't add that bean from the application. I didn't think about that when I made the suggestion. My apologies. To look into this, I created an issue in the backlog. In the meantime, I think I fixed the issue by directly modifying the custom |
@sobychacko Indeed, with SCS version 4.1.1-SNAPSHOT the problem is fixed 👍 |
Good to hear that, @ferblaca. |
hi, im sorry for wake this closed issue, but i have same error at ChannelsEndpoint on SCS version 4.0.4. |
Describe the issue
Hi,
I saw that you closed this issue : #2272
I am using spring-cloud-stream with rabbit and azure servicebus and I am still facing that issue for servicebus bindings.
To Reproduce
Steps to reproduce the behavior:
Version of the framework
Spring Cloud version : 2021.0.8
Azure service bus version : 4.10.0
The text was updated successfully, but these errors were encountered: