javax.xml.bind.UnmarshalException: unexpected element (uri:“”, local:“Group”)

前端 未结 14 1177
终归单人心
终归单人心 2020-12-02 10:13
unexpected element (uri:\"\", local:\"Group\"). Expected elements are <{}group>

Meet an exception when unmarshalling from xml



        
14条回答
  •  青春惊慌失措
    2020-12-02 11:11

    It looks like your XML document has the root element "Group" instead of "group". You can:

    1. Change the root element on your XML to be "group"
    2. Add the annotation @XmlRootElement(name="Group") to the Group classs.

提交回复
热议问题