Method threw ‘io.netty.util.IllegalReferenceCountException‘ exception.
在学习netty指南2时, 做netty开发http+xml的测试代码时,遇到如下错误:
客户端发送请求,服务端可以正常收到,但是服务端给客户端的response在客户端却接收不到,
将断点打到服务端的messageReceived(),方法中时,
显示客户端的request有如下错误信息:
Method threw 'io.netty.util.IllegalReferenceCountException' exception. Cannot evaluate io.netty.handler.codec.http.HttpObjectAggregator$AggregatedFullHttpResponse.toString()
百思不得其解,在网上也没有查到资料,跟断点也没跟出个所以然来,后来回想,自己之前改了pom依赖,
<dependency><groupId>io.netty</groupId><artifactId>netty-all</artifactId><version>5.0.0.Alpha2</version> </dependency>
但是书中的 版本是:5.0.0.Alpha1,然后就抱着试一试的心态,把版本改回了Alpha1,重新编译,
把报错的地方都改一下方法名称和重新导入一下依赖.
结果在此运行测试代码,居然跑通了.客户端也可以正常接收到服务端的response了,特此记录一下,以备后续查验.
Method threw ‘io.netty.util.IllegalReferenceCountException‘ exception.相关推荐
- Netty 5 io.netty.util.IllegalReferenceCountException 异常
Netty 5 io.netty.util.IllegalReferenceCountException 异常 参考文章: (1)Netty 5 io.netty.util.IllegalRefere ...
- netty解决方法 io.netty.util.IllegalReferenceCountException: refCnt: 0, increment: 1
netty解决方法 io.netty.util.IllegalReferenceCountException: refCnt: 0, increment: 1 参考文章: (1)netty解决方法 i ...
- netty4 io.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1
在netty4中,对象的生命周期由引用计数器控制,ByteBuf就是如此,每个对象的初始化引用计数加1,调用一次release方法,引用计数器会减1,当尝试访问计数器为0时,对象时,会抛出Illega ...
- netty报错 io.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1
netty报错,报错信息如下: io.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1 这是因为SimpleChan ...
- 7. 成功解决:io.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1
❤️ 个人主页:水滴技术
- class io.netty.util.internal.PlatformDependent0$6 cannot access class jdk.internal.misc.Unsafe
在使用 netty框架时发现在DEBUG模式下报错,但是不影响正常功能使用.就是看着不爽.解决办法是升级Netty 版本 "C:\Program Files\Java\jdk-11.0.7\ ...
- springboot启动报错Exception in thread “main“ java.lang.NoClassDefFoundError: io/netty/util/Timer
原因: 这是缺少netty包的原因. 解决方法: 加入一下依赖: <!-- https://mvnrepository.com/artifact/io.netty/netty-all --> ...
- Unable to evaluate the expression Method threw ‘net.sf.json.JSONException‘ exception.
json格式字符串含有null值,用JSONArray.fromObject转换为json数组时报错 --------------------------------- 问题出现 一天突然发现平时正常 ...
- 关于netty的中nettyio.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1异常排除
通常引起异常的原因是因为netty的计数的机制, 在服务器收到CloseWebSocketFrame后,SimpleChannelInboundHandler调用release时,会触发CloseWe ...
最新文章
- IOS网络框架的Alamofire5.4高版本网络工具封装
- q7goodies事例_Java 8 Friday Goodies:轻松派本地缓存
- Scala : unsupported operationexception : empty.reduceLeft
- [Linux]Linux man命令的使用方法
- 自动驾驶 9-6: EKF 的替代方案 - 无迹卡尔曼滤波器
- 2019最新盘点:适合中小型企业的财务系统软件
- C++ 无法打开包括文件“mysql.h“: No such file or directory
- SXF2019IP段合并
- 儒略日(CSP S2 第一题)
- 关于ie中使用a标签无法打开(预览)pdf问题
- PYNQ之Jupyter Notebook
- js中exec()函数的使用
- 拉卡拉智能支付终端助力港珠澳大桥快速通行
- golang字符串拼接方式
- 程序员相亲 满屏尴尬
- 如何屏蔽百度右侧的广告
- 穿过已知点画平滑曲线(3次贝塞尔曲线)
- NAT ALG DNS — DNS在内部,外网通过域名访问内部服务器
- 微信小程序解决wx.chooseMedia出发onShow方法
- Unity2D游戏开发常用点
热门文章
- font-spider 压缩字体文件 html vue
- java连接mysql教程_Java连接MySQL数据库详细教程(附网盘下载地址)
- ROS-3DSLAM(十一)lvi-sam源代码阅读9
- Python险种缴费记录管理(增删查改)
- 计量经济学学习笔记:简单线性模型
- codeforces 378C MAZE
- 基于机器学习的恶意软件检测(二)
- 黑苹果NVIDIA显卡驱动程序【 WebDriver-378.05.05.25f01+支持 	macOS 10.12.6 Sierra (16G29)版本】
- ROM, SRAM, SDRAM的区别
- LED音乐频谱之概述