pan3793 commented on code in PR #4849:
URL: https://github.com/apache/kyuubi/pull/4849#discussion_r1197375327
##########
kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/auth/HttpKerberosRequestInterceptor.java:
##########
@@ -65,7 +66,7 @@ protected void addHttpAuthHeader(HttpRequest httpRequest,
HttpContext httpContex
httpRequest.addHeader(
HttpAuthUtils.AUTHORIZATION, HttpAuthUtils.NEGOTIATE + " " +
kerberosAuthHeader);
} catch (Exception e) {
- throw new HttpException(e.getMessage(), e);
+ throw new HttpException(StringUtils.defaultIfBlank(e.getMessage(), ""),
e);
Review Comment:
```
Cause: org.apache.http.HttpException: Cannot invoke "String.toCharArray()"
because "message" is null
at
org.apache.kyuubi.jdbc.hive.auth.HttpRequestInterceptorBase.process(HttpRequestInterceptorBase.java:113)
at
org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:133)
at
org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at
org.apache.http.impl.execchain.ServiceUnavailableRetryExec.execute(ServiceUnavailableRetryExec.java:85)
at
org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at
org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118)
at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at
org.apache.thrift.transport.THttpClient.flushUsingHttpClient(THttpClient.java:251)
...
Cause: java.lang.NullPointerException: Cannot invoke
"String.toCharArray()" because "message" is null
at org.apache.http.HttpException.clean(HttpException.java:48)
at org.apache.http.HttpException.<init>(HttpException.java:105)
at
org.apache.kyuubi.jdbc.hive.auth.HttpKerberosRequestInterceptor.addHttpAuthHeader(HttpKerberosRequestInterceptor.java:68)
at
org.apache.kyuubi.jdbc.hive.auth.HttpRequestInterceptorBase.process(HttpRequestInterceptorBase.java:82)
at
org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:133)
at
org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at
org.apache.http.impl.execchain.ServiceUnavailableRetryExec.execute(ServiceUnavailableRetryExec.java:85)
at
org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at
org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
...
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]