Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
added 27 characters in body
Source Link
Kirby
  • 16k
  • 11
  • 97
  • 110

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?

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?

I encountered an exception when unmarshalling from XML:

 unexpected element (uri:"", local:"Group"). Expected elements are <{}group> 

Group 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")); 

What could be the cause?

formatted error message
Source Link
Aaron
  • 58k
  • 11
  • 123
  • 142

unexpected element (uri:"", local:"Group"). Expected elements are <{}group>

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?

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?

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?

Source Link
user496949
  • 86.6k
  • 150
  • 318
  • 437
Loading