Hello, I investigated further and here is the stack trace. Thanks for help! In 
Ambari, Toad or Hive CLI works fine...

2017-02-13 17:11:32,010 WARN  [HiveServer2-Handler-Pool: Thread-1372]: 
thrift.ThriftCLIService (ThriftCLIService.java:ExecuteStatement(492)) - Error 
executing statement:
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: 
FAILED: NullPointerException null
        at 
org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:315)
        at 
org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:112)
        at 
org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:181)
        at 
org.apache.hive.service.cli.operation.Operation.run(Operation.java:257)
        at 
org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:419)
        at 
org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:406)
        at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at 
org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:78)
        at 
org.apache.hive.service.cli.session.HiveSessionProxy.access$000(HiveSessionProxy.java:36)
        at 
org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSessionProxy.java:63)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:422)
        at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
        at 
org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:59)
        at com.sun.proxy.$Proxy43.executeStatementAsync(Unknown Source)
        at 
org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:274)
        at 
org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:486)
        at 
org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1317)
        at 
org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1302)
        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
        at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
        at 
org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge.java:692)
        at 
org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
        at 
org.apache.hadoop.hive.metastore.Warehouse.getDatabasePath(Warehouse.java:169)
        at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:1773)
        at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:1531)
        at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genResolvedParseTree(SemanticAnalyzer.java:10064)
        at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10115)
        at 
org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:211)
        at 
org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:227)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:456)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:316)
        at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1181)
        at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1175)
        at 
org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:110)
      ... 26 more

From: Jason Dere [mailto:jd...@hortonworks.com]
Sent: sobota 17. prosince 2016 0:19
To: user@hive.apache.org<mailto:user@hive.apache.org>
Subject: Re: beeline null pointer exception


You probably need to take a look at the HiveServer2 logs which might have a 
stack trace for that error.



________________________________
From: Brotanek, Jan 
<jan.brota...@adastragrp.com<mailto:jan.brota...@adastragrp.com>>
Sent: Friday, December 16, 2016 1:05 PM
To: user@hive.apache.org<mailto:user@hive.apache.org>
Subject: beeline null pointer exception

Hello, I have problem executing following statement in Beeline version 
1.2.1000.2.4.0.0-169 by Apache Hive CLI (beeline being invoked with config: 
--fastConnect=true --hive.cli.errors.ignore=true):

create table if not exists test.testorc

STORED AS ORC

as

select

*

from test.testorc_e
;

Error: Error while compiling statement: FAILED: NullPointerException null 
(state=42000,code=40000).

I played around with beeline settings and also with formatting (CR/LF) of 
query. However still getting that error. In Hive it works perfectly fine...

Thanks
Jan

Reply via email to