Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Who agreed with this topic

JDBC Hive connection failure - Exception: Syntax error ), Query: set -v.

New Contributor



I'm trying to connect to Hive 1.1.0-cdh5.11.2, using 2.6.1 Cloudera JDBC driver.

Getting the next error:

java.sql.SQLException: [Cloudera][HiveJDBCDriver](500151) Error setting/closing session: Open Session Error.
    at com.cloudera.hiveserver2.hivecommon.api.ExtendedHS2Client.openSession(Unknown Source)
    at com.cloudera.hiveserver2.hivecommon.api.HS2Client.<init>(Unknown Source)
    at com.cloudera.hiveserver2.hivecommon.api.ExtendedHS2Client.<init>(Unknown Source)
    at com.cloudera.hiveserver2.hivecommon.api.ZooKeeperEnabledExtendedHS2Factory.createClient(Unknown Source)
    at com.cloudera.hiveserver2.hivecommon.core.HiveJDBCCommonConnection.establishConnection(Unknown Source)
    at com.cloudera.hiveserver2.jdbc.core.LoginTimeoutConnection.connect(Unknown Source)
    at com.cloudera.hiveserver2.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
    at com.cloudera.hiveserver2.jdbc.common.AbstractDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(
    at java.sql.DriverManager.getConnection(
Caused by: [Cloudera][HiveJDBCDriver](500151) Error setting/closing session: Open Session Error.
    ... 10 more
Caused by: [Cloudera][HiveJDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:AnalysisException: Syntax error in line 1:
set -v
Encountered: -

CAUSED BY: Exception: Syntax error
), Query: set -v.
    at com.cloudera.hiveserver2.hivecommon.api.HS2Client.executeStatementInternal(Unknown Source)
    at com.cloudera.hiveserver2.hivecommon.api.HS2Client.executeStatement(Unknown Source)
    at com.cloudera.hiveserver2.hivecommon.api.HS2Client.runCatalogFunction(Unknown Source)
    ... 10 more


Have ho idea why "set -v" is not working there - it works fine if executing from Query editor in Hue


P.S. I was able to connect to Hive using the very first 2.5.10 driver version, but there I can not select some tables returned by "show tables"...


Any thoughts?



Who agreed with this topic