-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
Cannot construct instance of PEPSchema.MEMBER
(although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('Yes1')
#655
Comments
If I just do MEMBER.class and have 1 household member then It deserializes fine. If I do the sectionB and the sectionb class I get the same error. Something with List causing an issue? |
Added a label noting that we'd need an actual manageable test case -- definitions and output above is way too big to help with reproduction, unfortunately. |
I have attached 4 smaller files for the test. What is happening is that Reading HOUSEHOLD_MEMBER by itself works and loads correctly into the java object. Doesn't matter if there is 1 household member in section b or multiple household members in section b both will result in the same error. Same thing happens when section b is in the Applicaiton tags the surrounding object application full type that also fails. I expect all 3 tests to return yes1. |
Ok this is more useful (thank you!), but what is eventually needed is a unit test to reproduce the problem. Still maybe someone has time to look into this and smaller files sound useful. |
Oh: forgot to mention that it may make sense to try this with |
JacksonXmlModule xmlModule = new JacksonXmlModule(); This is resolved once I used this code above. Apparently since Jaxb uses lists we have to disable the defaultusewrapper. |
JAXB defaults are indeed different: if no annotations/configuration is changed, JAXB defaults to "unwrapped" Lists. Jackson defaults to wrapped Lists and requires configuration or annotations to disable it. |
JacksonXmlUtil.txt
APPLICATION_FULL_TYPE.txt
SECTION_B_TYPE.txt
MEMBER.txt
Looks similar to this issue, but I am still having this issue even though I am using 2.17.1 #646
I am expecting Yes1 for all 3 tests.
ERROR:
CODE:
The text was updated successfully, but these errors were encountered: