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

Getting nullpointerException during impala connection

Getting nullpointerException during impala connection

New Contributor

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)

1 REPLY 1

Re: Getting nullpointerException during impala connection

New Contributor

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.