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

Duplicate Message Convertors #39743

Closed
hassanrehman01398 opened this issue Feb 23, 2024 · 5 comments
Closed

Duplicate Message Convertors #39743

hassanrehman01398 opened this issue Feb 23, 2024 · 5 comments
Labels
status: declined A suggestion or change that we don't feel we should currently apply

Comments

@hassanrehman01398
Copy link

Issue Description:

I'm encountering an issue with duplicate MappingJackson Converters of the same data type in my Spring application. The first converter has five modules registered, while the second one has two. When making a RestTemplate call, the second converter is being invoked, leading to the following error:

com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Invalid type definition for type Argument #0 of constructor com.fasterxml.jackson.annotation.JsonCreator=@com.fasterxml.jackson.annotation.JsonCreator(mode=DEFAULT)} has no property name (and is not Injectable): cannot use as property-based Creator

This error indicates a problem during Jackson deserialization. It appears that the second converter is causing conflicts in the deserialization process, resulting in the mentioned exception.

Steps to Reproduce:

Register two MappingJackson Converters of the same data type.
The first converter has five modules, and the second converter has two modules.
Make a RestTemplate call that triggers the deserialization process.
Expected Behavior:

The RestTemplate should use the first converter for deserialization without any issues.

Actual Behavior:

The second converter is invoked during deserialization, leading to the InvalidDefinitionException.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 23, 2024
@wilkinsona
Copy link
Member

Thanks for the report. Unfortunately, the steps to reproduce aren't sufficient for us to diagnose the problem as they leave too much unknown. If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label Feb 23, 2024
@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 Feb 23, 2024
@wilkinsona
Copy link
Member

We're a small team and, unfortunately, we cannot afford to spend our time recreating a problem from a brief description and a screenshot. You haven't even told us which version of Spring Boot you're using.

As I said above, if you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.

@wilkinsona wilkinsona added status: waiting-for-feedback We need additional information before we can continue and removed status: feedback-provided Feedback has been provided labels Feb 23, 2024
@hassanrehman01398

This comment was marked as resolved.

@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 Feb 23, 2024
@wilkinsona
Copy link
Member

The code is private and I can't share that

We don't need to see your full app, just a minimal app that reproduces the problem.

Spring version: 2.7.5

OSS support for Spring Boot 2.7.x is no longer available. Please upgrade to 3.1.x or later. If the problem still occurs and you provide a complete yet minimal example that reproduces it, we can re-open this issue and take another look.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Feb 23, 2024
@wilkinsona wilkinsona added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged status: feedback-provided Feedback has been provided labels Feb 23, 2024
@bclozel
Copy link
Member

bclozel commented Feb 23, 2024

Also see #21374 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

No branches or pull requests

4 participants