1

I am trying to connect to impala and do a simple select query using JdbcTemplate(). I keep getting the following error:

java.sql.SQLException: [Simba][ImpalaJDBCDriver](500164) Error initialized or created transport for authentication: null.
at com.cloudera.impala.hivecommon.api.HiveServer2ClientFactory.createTransport(Unknown Source)
at com.cloudera.impala.hivecommon.api.HiveServer2ClientFactory.createClient(Unknown Source)
at com.cloudera.impala.hivecommon.core.HiveJDBCConnection.connect(Unknown Source)
at com.cloudera.impala.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
at com.cloudera.impala.jdbc.common.AbstractDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at ProcedureDAOImpl.updateProcedure(ProcedureDAOImpl.java:55)
at MainRunner.procedure1(MainRunner.java:61)
at MainRunner.run(MainRunner.java:33)
at java.util.TimerThread.mainLoop(Unknown Source)
Caused by: com.cloudera.impala.support.exceptions.GeneralException: [Simba][ImpalaJDBCDriver](500164) Error initialized or created transport for authentication: null.
... 11 more    

ApplicationContext bean for this connection is defined like this:

<bean id="impalaDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    <property name="driverClassName" value="com.cloudera.impala.jdbc4.Driver"></property>
    <property name="url" value="${jdbc.impala.url}"/>
    <property name="username" value="${jdbc.impala.username}"/>
    <property name="password" value="${jdbc.impala.password}"/>
</bean>

I tried to connect with DriverManager class and it was successful. But when I try to use dbcp class, it fails. Does anybody have some suggestion on this?

3Libras
  • 23
  • 1
  • 5
  • Update: I replaced ImpalaJDBC4 driver version 2.5.16 with version 2.5.30 and it worked. – 3Libras Jan 10 '17 at 09:11
  • I'm also having the same problem using Simba drivers. May I know which driver are you using? and What is your JDK and OS [in client] – Indranil Gayen Jan 19 '17 at 07:33
  • @3Libras - I am also getting the same error in the Linux environment with JDK1.8 and ImpalaJDBC41 driver. could you please tell what all you have done with the env details. – MSV May 29 '18 at 16:27

1 Answers1

0

When I got the same error while I was connecting to Impala on DBeaver.

The possible workaround that I found is to keep updating to the latest Impala JDBC driver available.

Note: It works for a while and then I get the same error again. Updating it again solves the problem.

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140