-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
@JsonProperty(access = READ_ONLY)
together with generated constructor (lombok) causes JsonMappingException: Could not find creator property with name [...]
#1345
Comments
I made a sample project to illustrate the issue. |
Thank you for reporting this. I think this is part of a known problem related to resolution of creator properties vs "regular" properties, where effectively the two can be out of sync. Unfortunately solving that issue is likely to require a major rewrite of property resolution, which is why the problem persists (in some form it has affected version from 2.6 to 2.8 I think). |
I think this might be due to #1383 that I just fixed (to be included in 2.7.8 / 2.8.4). |
@JsonProperty(access = READ_ONLY)
together with generated constructor (lombok) causes JsonMappingException: Could not find creator property with name [...]
I'm using Jackson 2.8.6 and get this error, too. Here's my test code:
The code works fine when deleting |
@benneq Thank you, I can reproduce this. |
Interesting. For some reason Creator properties are not being collected at all... |
Ah ok. Due to one of parameters being |
The following class fails to deserialise with a
com.fasterxml.jackson.databind.JsonMappingException: Could not find creator property with name 's' (in class LombokObject)
:Whereas the following class - which is functionally identical but with constructors, getters and setters in the code - can be deserialised:
The exception is
The text was updated successfully, but these errors were encountered: