sercanCyberVision opened a new pull request, #6762:
URL: https://github.com/apache/hive/pull/6762
**ROOT CAUSE**
When `USE_BEELINE_FOR_HIVE_CLI=false` the Hive CLI fails with a
`NullPointerException` in interactive mode:
```
hive> show tables;
Exception in thread "main" java.lang.NullPointerException: Cannot invoke
"org.jline.reader.LineReader.getTerminal()" because "this.reader" is null
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:379)
at
org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:860)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:791)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:705)
at
java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.apache.hadoop.util.RunJar.run(RunJar.java:333)
at org.apache.hadoop.util.RunJar.main(RunJar.java:254)
```
`executeDriver()` creates a new `CliDriver` instance and uses it for
operations such as:
```
CliDriver cli = newCliDriver();
cli.setHiveVariables(oproc.getHiveVariables());
// use the specified database if specified
cli.processSelectDatabase(ss);
// Execute -i init files (always in silent mode)
cli.processInitFiles(ss);
```
However, the `LineReader` is initialized on the outer `CliDriver` instance:
```
setupLineReader();
```
**SOLUTION**
Initialize the `LineReader` on the same `CliDriver` instance.
--
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]