javax.xml.bind.UnmarshalException: unexpected element (uri:“”, local:“Group”)
unexpected element (uri:"", local:"Group"). Expected elements are <{}group>
从 xml 取消编组时遇到异常
JAXBContext jc = JAXBContext.newInstance(Group.class);
Unmarshaller unmarshaller = jc.createUnmarshaller();
Group group = (User)unmarshaller.unmarshal(new File("group.xml"));
组类没有任何注释和组.xml只包含数据。
任何事情都可以是原因吗?