您的位置:首页 > 编程语言 > Java开发

SpringMVC 常见异常处理

2015-06-02 12:08 543 查看
1、javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"request").

javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"request"). Expected elements are <{}callAuthen>,<{}employee>,<{}employees>,<{}xml>...

springmcv 假设Rest接口,发送xml数据请求的时候,出现上述错误;

解决方案:

错误提示:提交的数据xml根节点是<request>,但是程序只解析<{}callAuthen>,<{}employee>,<{}employees>,<{}xml>,所以检查请求根节点,修改即可。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: