ItGo.me - 专注IT技术分享

首页 > Exception > org.apache.http.TruncatedChunkException: Truncated chunk解决方法

org.apache.http.TruncatedChunkException: Truncated chunk解决方法

时间:2015-01-14来源:网友分享 点击:
org.apache.http.TruncatedChunkException: Truncated chunk ( expected size: 8003; actual size: 7434)
	at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:186)
	at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:138)
	at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:411)
	at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453)
	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
	at java.io.InputStreamReader.read(InputStreamReader.java:167)
	at java.io.Reader.read(Reader.java:122)
	at org.apache.http.util.EntityUtils.toString(EntityUtils.java:224)
	at org.apache.http.util.EntityUtils.toString(EntityUtils.java:248)

  
    比如访问 url:
1、如果是一直报这个错 说明是服务端问题(如服务器故意给你返回错误的数据);
2、如果偶尔报这个错 说明是客户端网络(如丢包)等问题造成的,可以考虑失败重试两次,如果还失败可以考虑记下日志,定期重试。

这个也是属于很正常的行为,就如网络问题,只要考虑好如失败重试 等策略解决这种问题就行了。

no "ssl_certificate" is defined in server listening on SSL port while SSL handshaking, client: 192.168.6.238, server: 0.0.0.0:443解决

no "ssl_certificate" is defined in server listening on SSL port while SSL handshaking...

resolution will not be reattempted until the update interval of Nexus has elapsed or updates are forced解决

/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of Nexus has elapsed or updates are forced...

java.lang.NoSuchMethodError: org.junit.runner.Request.classWithoutSuiteMethod解决方法

java.lang.NoSuchMethodError: org.junit.runner.Request.classWithoutSuiteMethod(Ljava/lang/Class;)Lorg/junit/runner/Request; 原因:这是junit4版本存在的bug; 解决方法:下载junit4.4进行替换就可以了。...

org.apache.http.TruncatedChunkException: Truncated chunk ( expected size: 8003; actual size: 7434) at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:186) at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStre
------分隔线----------------------------