I encountered an exception when unmarshalling from XML:
unexpected element (uri:"", local:"Group"). Expected elements are <{}group> Meet an exception when unmarshalling from xmlGroup class has no annotations and group.xml just contains data.
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 canWhat could be the cause?