Reply
New Contributor
Posts: 1
Registered: ‎04-13-2019

Getting nullpointerException during impala connection

[ Edited ]

Hi,

 

I am trying to get the impala jdbc connection; below is the spring bean datasource definition for same. I am getting the exception while connecting; please refer to the exception below. Can someone please help

 

<bean id="ID1" class="org.springframework.jdbc.datasource.DriverManagerDataSource">

<property name="driverClassName" value="com.cloudera.impala.jdbc41.Driver" />

<property name="url" value="jdbc:impala://myhost:21050/;AuthMech=1;KrbRealm=myrealm;KrbServiceName=impala;KrbHostFQDN=xxx" />

</bean>

 

==java.lang.NullPointerException
===Stack trace...
java.util.Hashtable.put(Unknown Source)
com.cloudera.jdbc.common.AbstractDriver.copyProperties(Unknown Source)
com.cloudera.jdbc.common.AbstractDriver.connect(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:173)
org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:164)
org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:149)
org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:119)
org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)

Highlighted
New Contributor
Posts: 1
Registered: ‎04-13-2019

Re: Getting nullpointerException during impala connection

The above error occurs only when there is also an attempt made to connect to Oracle DB. So looks like the conflict in drivers. If Oracle driver is not used, impala connects successfully.

Any help is appreciated.