简体   繁体   English

com.amazonaws.AmazonClientException:读取的数据长度与预期的长度不同

[英]com.amazonaws.AmazonClientException: Data read has a different length than the expected

I am running into this problem in the course of working on a rest api that accepts PUT calls and then streams that contents of the push into S3 using the AWS S3 Java API. 我在使用一个接受PUT调用的REST API的过程中遇到了这个问题,然后使用AWS S3 Java API将推送的内容流式传输到S3中。

The error I am getting was this: 我得到的错误是这样的:

Caused by: com.amazonaws.AmazonClientException: Data read has a different length than the expected: dataLength=365; 由以下原因引起:com.amazonaws.AmazonClientException:读取的数据长度与预期的长度不同:dataLength = 365; expectedLength=366; expectedLength = 366; includeSkipped=false; includeSkipped = FALSE; in.getClass()=class org.duracloud.common.stream.ChecksumInputStream; in.getClass()= class org.duracloud.common.stream.ChecksumInputStream; markedSupported=false; markedSupported = FALSE; marked=0; 标记= 0; resetSinceLastMarked=false; resetSinceLastMarked = FALSE; markCount=0; markCount = 0; resetCount=0 resetCount = 0

I'm using aws-java-sdk 1.9.1. 我正在使用aws-java-sdk 1.9.1。

The problem has appeared since I upgraded from v.1.7.3 自从v.1.7.3升级以来,问题就出现了

虽然我不清楚aws sdk中到底是什么引起了问题,但我通过将content-type http头显式设置为默认值“ application / x-www-form-urlencoded”以外的其他内容来解决了该问题。由curl和jquery发送的值。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AmazonClientException:读取的数据长度与预期不同 - AmazonClientException: Data read has a different length than the expected com.amazonaws.SdkClientException:读取的数据长度与预期的长度不同 - com.amazonaws.SdkClientException: Data read has a different length than the expected com.amazonaws.AmazonClientException:无法执行HTTP请求:对等方未通过身份验证 - com.amazonaws.AmazonClientException: Unable to execute HTTP request: peer not authenticated 在s3上上传文件失败,导致com.amazonaws.AmazonClientException异常 - File upload on s3 fail getting the com.amazonaws.AmazonClientException Exception 如何解决线程“main”中的异常com.amazonaws.AmazonClientException:无法构建密码:使用aws s3非法密钥大小 - how to resolve Exception in thread “main” com.amazonaws.AmazonClientException: Unable to build cipher: Illegal key size using aws s3 Pyspark S3 NoClassDefFoundError: com/amazonaws/AmazonClientException - Pyspark S3 NoClassDefFoundError: com/amazonaws/AmazonClientException 数据读取的长度与预期的不同:dataLength = 964481363; expectedLength = 964481376; - Data read has a different length than the expected: dataLength=964481363; expectedLength=964481376; Android SharedPreferences:存储的字符串的长度与检索到的字符串的长度不同? - Android SharedPreferences: String stored has different length than String retrieved? Maven 项目“AmazonS3ClientBuilder() 在 com.amazonaws.services.s3.AmazonS3ClientBuilder 中具有私有访问权限” - Maven project "AmazonS3ClientBuilder() has private access in com.amazonaws.services.s3.AmazonS3ClientBuilder" 未找到依赖项“com.amazonaws” - Dependency 'com.amazonaws' not found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM