开发者社区> 问答> 正文

上传的时候报以下异常

首先问下这个客户端是否开源,这样调试也方便些。。再者就是以下问题了。。请大家帮忙看看

Exception in thread "main" com.aliyun.openservices.ClientException: 网络连接错误,详细信息:null
at com.aliyun.common.comm.ServiceClient.sendRequestImpl(ServiceClient.java:198)
at com.aliyun.common.comm.ServiceClient.sendRequest(ServiceClient.java:138)
at com.aliyun.openservices.oss.internal.OSSOperation.send(OSSOperation.java:59)
at com.aliyun.openservices.oss.internal.OSSObjectOperation.putObject(OSSObjectOperation.java:76)
at com.aliyun.openservices.oss.OSSClient.putObject(OSSClient.java:283)
at com.aliyun.openservices.oss.samples.OSSObjectSample.uploadFile(OSSObjectSample.java:120)
at com.aliyun.openservices.oss.samples.OSSObjectSample.main(OSSObjectSample.java:63)
Caused by: org.apache.http.client.ClientProtocolException
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
at com.aliyun.common.comm.DefaultServiceClient.sendRequestCore(DefaultServiceClient.java:51)
at com.aliyun.common.comm.ServiceClient.sendRequestImpl(ServiceClient.java:175)
... 6 more
Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity.
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:625)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:464)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
... 10 more

展开
收起
笨呆呆笨 2014-01-02 16:38:04 9668 0
1 条回答
写回答
取消 提交回答
  • Re上传的时候报以下异常
    java的sdk不是开源的,lz可以在自己的代码里加一个出错重传的逻辑,这种报错应该是网络抖动或者其他网络方面的问题
    2014-01-02 17:57:36
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载