Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org.xml.sax.SAXNotRecognizedException: unrecognized feature #1734

Closed
yoke233 opened this issue Aug 28, 2020 · 5 comments
Closed

org.xml.sax.SAXNotRecognizedException: unrecognized feature #1734

yoke233 opened this issue Aug 28, 2020 · 5 comments

Comments

@yoke233
Copy link

yoke233 commented Aug 28, 2020

提问前,请确保阅读过项目首页说明以及wiki开发文档相关内容,尤其是常见问题部分。完成内容后,请务必移除包括本句在内的无用内容,以免影响阅读,否则直接关闭,谢谢合作~

另外如果确认属于bug,而且已明确如何修复,请参考贡献指南直接提交PR,省的浪费时间在这里描述问题,非常感谢配合

简要描述

企业号内app发消息时 对xml内容做处理时报错

模块版本情况

  • WxJava 模块名: weixin-java-cp
  • WxJava 版本号: 3.9.0

详细描述

spring boot 版本 2.3.3
使用代码
WxCpXmlMessage inMessage = WxCpXmlMessage
.fromEncryptedXml(requestBody, wxCpService.getWxCpConfigStorage(),
timestamp, nonce, signature);

日志

2020-08-28 17:59:22 [http-nio-8082-exec-8] ERROR o.zolo.config.GlobalExceptionHandler - org.xml.sax.SAXNotRecognizedException: unrecognized feature http://apache.org/xml/features/disallow-doctype-decl
java.lang.RuntimeException: org.xml.sax.SAXNotRecognizedException: unrecognized feature http://apache.org/xml/features/disallow-doctype-decl
at me.chanjar.weixin.common.util.XmlUtils.xml2Map(XmlUtils.java:46)
at me.chanjar.weixin.cp.bean.WxCpXmlMessage.fromXml(WxCpXmlMessage.java:415)
at me.chanjar.weixin.cp.bean.WxCpXmlMessage.fromEncryptedXml(WxCpXmlMessage.java:431)

@binarywang
Copy link
Member

楼主请参考下这个:https://gitee.com/binary/weixin-java-tools/issues/I1NA7U

@yoke233
Copy link
Author

yoke233 commented Aug 31, 2020

楼主请参考下这个:https://gitee.com/binary/weixin-java-tools/issues/I1NA7U

这个解决方案无效

其实是有个依赖关联了dom4j 1.6.3 导致的
去掉好了

@binarywang
Copy link
Member

楼主请参考下这个:https://gitee.com/binary/weixin-java-tools/issues/I1NA7U

这个解决方案无效

其实是有个依赖关联了dom4j 1.6.3 导致的
去掉好了

看样子应该是两种场景,不同的场景解决方法不同

@wjzjames
Copy link

wjzjames commented Jul 7, 2021

楼主请参考下这个:https://gitee.com/binary/weixin-java-tools/issues/I1NA7U

这个解决方案无效

其实是有个依赖关联了dom4j 1.6.3 导致的
去掉好了

请问下,这个去掉是什么意思,去掉什么?去掉dom4j的话weixin-java-cp也跑不了啊

@wjzjames
Copy link

wjzjames commented Jul 7, 2021

楼主请参考下这个:https://gitee.com/binary/weixin-java-tools/issues/I1NA7U

这个解决方案无效
其实是有个依赖关联了dom4j 1.6.3 导致的
去掉好了

看样子应该是两种场景,不同的场景解决方法不同

compile 'xerces:xercesImpl:2.12.1'加入这个好像也解决不了,版本是4.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants