Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Vaadin Rest Web Service
Hi
I am trying out a rest webservice application to retrieve information from a url to an interface using vaadin. With the tool on http://www.jsonschema2pojo.org/ , i convert the json file from this link http://bibdb.libris.kb.se/api/lib?ocode=KB into java classes. However, when i run the project, i get the error as shown in the attached file which seems to state that some variable names cannot be located in the java data classes starting with the variable name "alt_name". Below shows how the variable is showed in the java class for the getter and setter settings
@JsonProperty("alt_name")
public Object altName;
@JsonProperty("alt_name")
public Object getAltName() {
return altName;
}
@JsonProperty("alt_name")
public void setAltName(Object altName) {
this.altName = altName;
}
It is clear that there is a mismatch between the "alt_name" and "altName" which is how Json and Java interpretes the variable respectively. I have tried to manually change the java interpretation to match the JsonProperty but i still receive the same error.
I have googled about it and i have tried some suggestions with the popular suggestion being to use the annotation
@JsonIgnoreProperties(ignoreUnknown = true) in the java data classes, but it has not worked.
Please any help to solve this problem would be very much appreciated. I am very interested to know how to use vaadin on restfull Api's. Many Thanks.
Maybe some typo? I see "alt_Name" (with capital N) in the stack trace.
Thanks for the response Alejandro. The classes which contains the setter and getters were autogenerated, so it is not something i might have typed wrong.
But it might have been something that was incorrectly autogenerated. Just double check it ;) Your code uses "alt_name" when it should be "alt_Name" apparently.