mirror of
https://github.com/apache/sqoop.git
synced 2025-05-21 03:10:49 +08:00
SQOOP-1748: Sqoop2: Client throws NPE when misconfigured for Kerberos
(Richard Zhou via Abraham Elmahrek)
This commit is contained in:
parent
423de5d515
commit
51dd8375f3
@ -32,6 +32,9 @@ public enum ClientError implements ErrorCode {
|
||||
|
||||
/** Given connector is not known to the server **/
|
||||
CLIENT_0003("Connector do not exists"),
|
||||
|
||||
/** The system was not able to find valid Kerberos tikcet cache (kinit). */
|
||||
CLIENT_0004("Unable to find valid Kerberos ticket cache (kinit)");
|
||||
;
|
||||
|
||||
private final String message;
|
||||
|
@ -114,14 +114,16 @@ protected String doHttpRequest(String strURL, String method, String data) {
|
||||
|
||||
throw new SqoopException(ClientError.CLIENT_0001, ex.getThrowable());
|
||||
}
|
||||
} else {
|
||||
throw new SqoopException(ClientError.CLIENT_0000);
|
||||
}
|
||||
return result.toString();
|
||||
} catch (IOException ex) {
|
||||
LOG.trace("ERROR: ", ex);
|
||||
return "";
|
||||
throw new SqoopException(ClientError.CLIENT_0000, ex);
|
||||
} catch (AuthenticationException ex) {
|
||||
LOG.trace("ERROR: ", ex);
|
||||
return "";
|
||||
throw new SqoopException(ClientError.CLIENT_0004, ex);
|
||||
} finally {
|
||||
try {
|
||||
if (wr != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user