unexpected element (uri:"", local:"Group"). Expected elements are <{}group>
Meet an exception when unmarshalling from xml
JAXBContext jc = JAXBContext.newInstance(Group.class); Unmarshaller unmarshaller = jc.createUnmarshaller(); Group group = (User)unmarshaller.unmarshal(new File("group.xml"));
Group class has no any annotation and group.xml just contains data.
Anything can be the cause?
It looks like your XML document has the root element "Group" instead of "group". You can:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With