java语言,使用aliyun-sdk-oss-3.8.1.jar上传文件至对象oss对象存储报错,错误如下: com.aliyun.oss.ClientException: Failed to reset the request input stream: [ErrorCode]: Unknown [RequestId]: Unknown at com.aliyun.oss.common.comm.ServiceClient.sendRequestImpl(ServiceClient.java:114) at com.aliyun.oss.common.comm.ServiceClient.sendRequest(ServiceClient.java:70) at com.aliyun.oss.internal.OSSOperation.send(OSSOperation.java:83) at com.aliyun.oss.internal.OSSOperation.doOperation(OSSOperation.java:145) at com.aliyun.oss.internal.OSSOperation.doOperation(OSSOperation.java:102) at com.aliyun.oss.internal.OSSOperation.doOperation(OSSOperation.java:97) at com.aliyun.oss.internal.OSSMultipartOperation.uploadPart(OSSMultipartOperation.java:354) at com.aliyun.oss.OSSClient.uploadPart(OSSClient.java:824) at com.i2.dto.sync.OssOperator$PartUploader.run(OssOperator.java:619) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: Resetting to invalid mark at java.io.BufferedInputStream.reset(BufferedInputStream.java:448) at com.aliyun.oss.common.comm.ServiceClient.sendRequestImpl(ServiceClient.java:111) ... 11 more 请问该问题如何解决?
ava.security.NoSuchAlgorithmException:Algorithm HmacSHA1 not available
解决方法:
修改项目 jdk指向路径:
如下图,由原先的D:\Program Files\Java\jdk1.8.0_181 改为 D:\Program Files\Java\jre1.8.0_181 ,重启 eclipse 完成
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。