ExceptionInInitializerError while connecting to Teradata through JDBC Driver

Connectivity

ExceptionInInitializerError while connecting to Teradata through JDBC Driver

Hi,

I am trying to read data from Teradata DB in a MapReduce job using the JDBC Driver. I get the following exception/stack trace:

Provided connection string: jdbc:teradata://teradata/database=dbname

java.lang.ExceptionInInitializerError: null

at com.teradata.jdbc.jdbc.GenericTeraEncrypt.getTDgssVersion(GenericTeraEncrypt.java:640) ~[na:na]

at com.teradata.jdbc.jdbc_4.parcel.ClientConfigParcel.toStream(ClientConfigParcel.java:54) ~[na:na]

at com.teradata.jdbc.jdbc_4.io.TDPacket.addParcel(TDPacket.java:98) ~[na:na]

at com.teradata.jdbc.jdbc.GenericLogonController.run(GenericLogonController.java:94) ~[na:na]

at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:208) ~[na:na]

at com.teradata.jdbc.jdk6.JDK6_SQL_Connection.<init>(JDK6_SQL_Connection.java:35) ~[na:na]

at com.teradata.jdbc.jdk6.JDK6ConnectionFactory.constructSQLConnection(JDK6ConnectionFactory.java:25) ~[na:na]

at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:179) ~[na:na]

at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:169) ~[na:na]

at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:233) ~[1443013875589-0/:na]

at com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:159) ~[1443013875589-0/:na]

Tags (2)
1 REPLY
Teradata Employee

Re: ExceptionInInitializerError while connecting to Teradata through JDBC Driver

The most likely cause of that error is that the tdgssconfig.jar file is missing from your classpath.

Both the terajdbc4.jar file and the tdgssconfig.jar file must be present on your classpath.