java - 使用CXF3.x出现的报错
PHP中文网
PHP中文网 2017-04-17 13:33:30
[Java讨论组]

四月 10, 2015 3:05:33 上午 org.apache.cxf.transport.http.netty.server.NettyHttpServletHandler exceptionCaught
严重: Unexpected exception from downstream in Netty servlet handler, due to: {0}.
java.io.IOException: 远程主机强迫关闭了一个现有的连接。
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:446)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:871)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:224)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:108)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:494)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:461)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:378)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at java.lang.Thread.run(Unknown Source)

PHP中文网
PHP中文网

认证0级讲师

全部回复(1)
大家讲道理

出现这个问题原因是:
说明连接被强断了,没有通过协议交互调用close方法。
客户端自己关闭了连接,(没有调用SocketChannel的close方法。比如一些暴力断开方式,如拔网线,进程直接kill掉,或者windows下ctrl+c。),服务器还在read事件中,这个时候读取客户端的时候会报错。

我觉得问题已经很清楚了吧?

java Unexpected exception from downstream in Netty servlet handler, due to: {0}

netty向外发送数据的时候发生了异常。
应该是启动方式的不对。具体的能把启动的源代码贴出来看一下吗?没有源码怎么知道错误位置呢?
我现在的公司目前也是使用的apache cxf。可以多交流。

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号