aliyun / aliyun/alibabacloud-java-async-sdk
putObject throws darabonba.core.exception.TeaException: The value is not a map
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 34
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
PutObjectRequest putObjectRequest = PutObjectRequest.builder() //
.bucket("bucket") //
.key(key) //
.body(body) //
.build();
CompletableFuture response = asyncClient.putObject(putObjectRequest);
Caused by: darabonba.core.exception.TeaException: The value is not a map
at darabonba.core.utils.CommonUtil.assertAsMap(CommonUtil.java:45)
at com.aliyun.sdk.gateway.oss.internal.interceptor.TransformRequestBodyInterceptor.fromBody(TransformRequestBodyInterceptor.java:58)
at com.aliyun.sdk.gateway.oss.internal.interceptor.TransformRequestBodyInterceptor.modifyRequest(TransformRequestBodyInterceptor.java:31)
at darabonba.core.interceptor.InterceptorChain.modifyRequest(InterceptorChain.java:69)
at darabonba.core.TeaAsyncHandler.execute(TeaAsyncHandler.java:155)
at com.aliyun.sdk.service.oss20190517.DefaultAsyncClient.putObject(DefaultAsyncClient.java:1225)
at com.example.service.AliyunOssService.putObject(AliyunOssService.java:54)
at com.example.service.AliyunOssServiceTests.testGetObject1(AliyunOssServiceTests.java:73)
... 69 more
Caused by: java.lang.RuntimeException: The value is not a object
... 77 more
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the PutObjectRequest example and the stack trace, then inspect TransformRequestBodyInterceptor.java, CommonUtil.java, and DefaultAsyncClient.putObject. Reproduce the async putObject call with the shown request and trace how its body is transformed. Done means the reported request no longer throws the map/object conversion exception and the behavior is covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100