Java企业微信开发_13_异常:com.qq.weixin.mp.aes.AesException: 解密后得到的buffer非法

Posted shirayner

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Java企业微信开发_13_异常:com.qq.weixin.mp.aes.AesException: 解密后得到的buffer非法相关的知识,希望对你有一定的参考价值。

一、异常信息

技术分享图片
方法:[email protected] echostr是否存在 :false
java.lang.IllegalArgumentException: 20 > -367029533
    at java.util.Arrays.copyOfRange(Arrays.java:3519)
    at com.qq.weixin.mp.aes.WXBizMsgCrypt.decrypt(WXBizMsgCrypt.java:181)
    at com.qq.weixin.mp.aes.WXBizMsgCrypt.DecryptMsg(WXBizMsgCrypt.java:263)
    at aurora.plugin.weixin.qiye.service.WeixinService.populate(WeixinService.java:148)
    at aurora.plugin.weixin.qiye.service.WeixinServiceFactory.createQiyeWeixinService(WeixinServiceFactory.java:70)
    at aurora.plugin.weixin.qiye.service.WeixinServiceFactory.createWeixinService(WeixinServiceFactory.java:44)
    at aurora.plugin.weixin.qiye.WeiXinServlet.createServiceInstance(WeiXinServlet.java:57)
    at aurora.plugin.weixin.qiye.WeiXinServlet.doService(WeiXinServlet.java:142)
    at aurora.plugin.weixin.qiye.WeiXinServlet.doPost(WeiXinServlet.java:78)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)
e:com.qq.weixin.mp.aes.AesException: 解密后得到的buffer非法
com.qq.weixin.mp.aes.AesException: 解密后得到的buffer非法
    at com.qq.weixin.mp.aes.WXBizMsgCrypt.decrypt(WXBizMsgCrypt.java:186)
    at com.qq.weixin.mp.aes.WXBizMsgCrypt.DecryptMsg(WXBizMsgCrypt.java:263)
    at aurora.plugin.weixin.qiye.service.WeixinService.populate(WeixinService.java:148)
    at aurora.plugin.weixin.qiye.service.WeixinServiceFactory.createQiyeWeixinService(WeixinServiceFactory.java:70)
    at aurora.plugin.weixin.qiye.service.WeixinServiceFactory.createWeixinService(WeixinServiceFactory.java:44)
    at aurora.plugin.weixin.qiye.WeiXinServlet.createServiceInstance(WeiXinServlet.java:57)
    at aurora.plugin.weixin.qiye.WeiXinServlet.doService(WeiXinServlet.java:142)
    at aurora.plugin.weixin.qiye.WeiXinServlet.doPost(WeiXinServlet.java:78)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)
appName:hec
Parameter :<parameter msg_signature="f7d99497f68a57a64cab74c0125a11ed93eab56b" nonce="997855700" timestamp="1520258313"/>

方法:[email protected] echostr是否存在 :false
java.lang.IllegalArgumentException: 20 > -2071711425
    at java.util.Arrays.copyOfRange(Arrays.java:3519)
    at com.qq.weixin.mp.aes.WXBizMsgCrypt.decrypt(WXBizMsgCrypt.java:181)
    at com.qq.weixin.mp.aes.WXBizMsgCrypt.DecryptMsg(WXBizMsgCrypt.java:263)
    at aurora.plugin.weixin.qiye.service.WeixinService.populate(WeixinService.java:148)
    at aurora.plugin.weixin.qiye.service.WeixinServiceFactory.createQiyeWeixinService(WeixinServiceFactory.java:70)
    at aurora.plugin.weixin.qiye.service.WeixinServiceFactory.createWeixinService(WeixinServiceFactory.java:44)
    at aurora.plugin.weixin.qiye.WeiXinServlet.createServiceInstance(WeiXinServlet.java:57)
    at aurora.plugin.weixin.qiye.WeiXinServlet.doService(WeiXinServlet.java:142)
    at aurora.plugin.weixin.qiye.WeiXinServlet.doPost(WeiXinServlet.java:78)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)
e:com.qq.weixin.mp.aes.AesException: 解密后得到的buffer非法
com.qq.weixin.mp.aes.AesException: 解密后得到的buffer非法
    at com.qq.weixin.mp.aes.WXBizMsgCrypt.decrypt(WXBizMsgCrypt.java:186)
    at com.qq.weixin.mp.aes.WXBizMsgCrypt.DecryptMsg(WXBizMsgCrypt.java:263)
    at aurora.plugin.weixin.qiye.service.WeixinService.populate(WeixinService.java:148)
    at aurora.plugin.weixin.qiye.service.WeixinServiceFactory.createQiyeWeixinService(WeixinServiceFactory.java:70)
    at aurora.plugin.weixin.qiye.service.WeixinServiceFactory.createWeixinService(WeixinServiceFactory.java:44)
    at aurora.plugin.weixin.qiye.WeiXinServlet.createServiceInstance(WeiXinServlet.java:57)
    at aurora.plugin.weixin.qiye.WeiXinServlet.doService(WeiXinServlet.java:142)
    at aurora.plugin.weixin.qiye.WeiXinServlet.doPost(WeiXinServlet.java:78)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)
appName:hec
Parameter :<parameter msg_signature="6d67c1a9375daeb4872a5d1142302db23972288d" nonce="241594907" timestamp="1520258518"/>
View Code

 

二、异常原因

 

 

 

三、异常解决

 

以上是关于Java企业微信开发_13_异常:com.qq.weixin.mp.aes.AesException: 解密后得到的buffer非法的主要内容,如果未能解决你的问题,请参考以下文章

Java企业微信开发_04_自定义菜单

Java企业微信开发_08_JSSDK多图上传

Java企业微信开发_03_通讯录同步

Java企业微信开发_09_素材管理之下载微信临时素材到本地服务器

Java企业微信开发_10_未验证域名归属,JS-SDK功能受限

Java企业微信开发_07_素材管理之上传本地临时素材文件