Cant connect - R, RJDBC, Teradata JDBC and Mac

Connectivity

Cant connect - R, RJDBC, Teradata JDBC and Mac

I am unable to connect using the following snippet of code:


drv = JDBC("com.teradata.jdbc.TeraDriver","./TeraJDBC/terajdbc4.jar")


conn = dbConnect(drv,"jdbc:teradata://db1/TMODE=ANSI,CHARSET=UTF8",user="user1",password="pswrd1",dbname="test_db")

I get the following error messages:

GSSException: Failure unspecified at GSS-API level (Mechanism level: UserFile parameter null)

at com.teradata.tdgss.jtdgss.TdgssParseXml.<init>(DashoA1*..)

at com.teradata.tdgss.jtdgss.TdgssConfigApi.<init>(DashoA1*..)

at com.teradata.tdgss.jtdgss.TdgssManager.<init>(DashoA1*..)

at com.teradata.tdgss.jtdgss.TdgssManager.getInstance(DashoA1*..)

at com.teradata.jdbc.jdbc.GenericTeraEncrypt.getGSSM(GenericTeraEncrypt.java:622)

at com.teradata.jdbc.jdbc.GenericTeraEncrypt.getConfig(GenericTeraEncrypt.java:640)

at com.teradata.jdbc.jdbc.GenericTeraEncrypt.getUserNameForOid(GenericTeraEncrypt.java:733)

at com.teradata.jdbc.AuthMechanism.<init>(AuthMechanism.java:50)

at com.teradata.jdbc.jdbc.GenericInitDBConfigState.action(GenericInitDBConfigState.java:104)

at com.teradata.jdbc.jdbc.GenericLogonController.run(GenericLogonController.java:49)

at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:201)

at com.teradata.jdbc.jdbc_3.ifjdbc_4.TeraLocalConnection.<init>(TeraLocalConnection.java:99)

at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:58)

at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:218)

at com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:151)

at java.sql.DriverManager.getConnection(DriverManager.java:582)

at java.sql.DriverManager.getConnection(DriverManager.java:185)

GSSException: Failure unspecified at GSS-API level (Mechanism level: UserFile parameter null)

at com.teradata.tdgss.jtdgss.TdgssParseXml.<init>(DashoA1*..)

at com.teradata.tdgss.jtdgss.TdgssConfigApi.<init>(DashoA1*..)

at com.teradata.tdgss.jtdgss.TdgssManager.<init>(DashoA1*..)

at com.teradata.tdgss.jtdgss.TdgssManager.getInstance(DashoA1*..)

at com.teradata.jdbc.jdbc.GenericTeraEncrypt.getGSSM(GenericTeraEncrypt.java:622)

at com.teradata.jdbc.jdbc.GenericTeraEncrypt.getConfig(GenericTeraEncrypt.java:640)

at com.teradata.jdbc.jdbc.GenericTeraEncrypt.getUserNameForOid(GenericTeraEncrypt.java:733)

at com.teradata.jdbc.AuthMechanism.<init>(AuthMechanism.java:50)

at com.teradata.jdbc.jdbc.GenericInitDBConfigState.action(GenericInitDBConfigState.java:104)

at com.teradata.jdbc.jdbc.GenericLogonController.run(GenericLogonController.java:49)

at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:201)

at com.teradata.jdbc.jdbc_3.ifjdbc_4.TeraLocalConnection.<init>(TeraLocalConnection.java:99)

at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:58)

at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:218)

at com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:151)

Error in .jcall(drv@jdrv, "Ljava/sql/Connection;", "connect", as.character(url)[1],  : 

  java.lang.NullPointerException

I have tweaked the code to point to the jar file that is installed with the java version of SQL assistant, but the result is the same error message. My SQL assistant though, works fine.

I am using R 2.13, with RStudio 0.94.92 on Mac 10.6.8 and trying to connect to TD 13.10

Tags (2)
1 REPLY
Teradata Employee

Re: Cant connect - R, RJDBC, Teradata JDBC and Mac

It's always a good idea to refer to the Troubleshooting section of the Teradata JDBC Driver User Guide.

http://developer.teradata.com/doc/connectivity/jdbc/reference/current/jdbcug_chapter_5.html#CHDIJJJH

Here's the relevant excerpt:

If you receive a "UserFile parameter null" error, then the problem might be due to the classpath not being set, or the classpath being set incorrectly such that tdgssconfig.jar cannot be found. The tdgssconfig.jar file must be listed on the classpath.

In your line of code, you only listed terajdbc4.jar, but tdgssconfig.jar must also be available on the classpath.

drv = JDBC("com.teradata.jdbc.TeraDriver","./TeraJDBC/terajdbc4.jar")

--Tom