-
Notifications
You must be signed in to change notification settings - Fork 26.6k
Closed
Labels
type/bugBugs to being fixedBugs to being fixed
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Environment
- Dubbo version: 3.2.5
- Operating System version: MAC OS
- Java version: 17
Steps to reproduce this issue
- 定义rest接口并配置client=apache-http-client
**
* 文件管理服务接口
*
* @author chaoxin.lu
* @since 2018/6/28
*/
@RequestMapping("/oss")
public interface FileSvc {
/**
* 获取文件
*
* @param bucket
* @param key
* @return
*/
@GetMapping
@ResponseBody
R<FileEntry> getObject(@RequestParam("bucket") String bucket,
@RequestParam("key") String key);
}
dubbo:
protocol:
id: ${DUBBO_PROTOCOL:rest}
name: ${DUBBO_PROTOCOL:rest}
client: ${DUBBO_CLIENT:apache-http-client}
port: ${DUBBO_PORT:20895}
server: ${DUBBO_PROTOCOL_SERVER:netty}
Pls. provide [GitHub address] to reproduce this issue.
Expected Behavior
Actual Behavior
If there is an exception, please attach the exception trace:
Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.http.Header.getValue()" because the return value of "org.apache.http.client.methods.CloseableHttpResponse.getFirstHeader(String)" is null
at org.apache.dubbo.remoting.http.restclient.HttpClientRestClient$1.getContentType(HttpClientRestClient.java:96)
at org.apache.dubbo.rpc.protocol.rest.RestInvoker.lambda$doInvoke$0(RestInvoker.java:105)
at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863)
at java.base/java.util.concurrent.CompletableFuture.uniWhenCompleteStage(CompletableFuture.java:887)
at java.base/java.util.concurrent.CompletableFuture.whenComplete(CompletableFuture.java:2325)
at org.apache.dubbo.rpc.protocol.rest.RestInvoker.doInvoke(RestInvoker.java:87)
at org.apache.dubbo.rpc.protocol.AbstractInvoker.doInvokeAndReturn(AbstractInvoker.java:243)
at org.apache.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:187)
... 97 more
Metadata
Metadata
Assignees
Labels
type/bugBugs to being fixedBugs to being fixed


