I have an application that tries to connect to Impala and Oracle. Below are the 2 beans defined.
Impala Driver - ImpalaJDBC41-2.5.41.jar Oracle Driver - ojdbc6.jar
<bean id="ID1" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.cloudera.impala.jdbc41.Driver"/>
<property name="url" value="jdbc:impala://impalahost:21050/;AuthMech=1;KrbRealm=myrealm;KrbServicName=impala;KrbHostFQDN=xxx" />
</bean>
<bean id="ID2" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="url" value="jdbc:oracle:thin:@//oraclehost:1523/DB" />
<property name="username" value="myuser" />
<property name="password" value="pwd" />
<property name="connectionProperties">
<props>
<prop key="defaultRowPrefetch">5000</prop>
</props>
</property>
</bean>
While getting the "Oracle" connection with a bean reference - ID2, getting this exception (surprisingly it goes to cloudera driver code)-
==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.getConnectionFrom
DriverManager(DriverManagerDataSource.java:173) org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFrom
Driver(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)
The same configurations work fine with Java 1.7