All Forums Connectivity
andydempsey 2 posts Joined 05/10
21 Sep 2011
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>(DashoA 1*..)

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

at com.teradata.tdgss.jtdgss.TdgssManager.getInstance(Das hoA1*..)

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

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

at com.teradata.jdbc.jdbc.GenericTeraEncrypt.getUserNameF orOid(GenericTeraEncrypt.java:733)

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

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

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

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

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

at com.teradata.jdbc.jdbc.ConnectionFactory.createConnect ion(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.jav a:582)

at java.sql.DriverManager.getConnection(DriverManager.jav a: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>(DashoA 1*..)

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

at com.teradata.tdgss.jtdgss.TdgssManager.getInstance(Das hoA1*..)

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

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

at com.teradata.jdbc.jdbc.GenericTeraEncrypt.getUserNameF orOid(GenericTeraEncrypt.java:733)

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

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

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

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

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

at com.teradata.jdbc.jdbc.ConnectionFactory.createConnect ion(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:
tomnolan 594 posts Joined 01/08
22 Sep 2011

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

 

You must sign in to leave a comment.