我正在尝试连接到impala并使用JdbcTemplate()
执行简单的选择查询。我一直收到以下错误:
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定义如下:
<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>
我尝试与DriverManager
课程联系,但成功了。但是当我尝试使用dbcp类时,它会失败。有没有人对此提出一些建议?
答案 0 :(得分:0)
当我在 DBeaver 上连接到 Impala 时遇到同样的错误。
我发现的可能解决方法是不断更新到可用的最新 Impala JDBC 驱动程序。
注意:它工作了一段时间,然后我再次收到相同的错误。再次更新即可解决问题。