All Forums Connectivity
gargneha03 2 posts Joined 03/16
11 Mar 2016
Unable to establish connection between R studio and Teradata

i am using Terdata version 13.10 and R Studio 3.2.3 (32-bit). I am trying to establish connection between both using following code. I also have all required JDBC drivers installed on system.

drv = JDBC("com.teradata.jdbc.TeraDriver","C:\\Users\\ Public\\Desktop\\TeraJDBC__indep_indep.15.00.00.33\\ terajdbc4.jar;C:\\Users\\Public\\Desktop\\ TeraJDBC__indep_indep.15.00.00.33\\tdgssconfig.jar")

 

conn = dbConnect(drv,"jdbc:teradata://tddev","userid"," password") 

 

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

at com.teradata.tdgss.jtdgss.TdgssParseXml.<init>(TdgssPa rseXml.java:81)

at com.teradata.tdgss.jtdgss.TdgssConfigApi.<init>(TdgssC onfigApi.java:81)

at com.teradata.tdgss.jtdgss.TdgssConfigApi.<clinit>(Tdgs sConfigApi.java:44)

at com.teradata.tdgss.jtdgss.TdgssManager.<init>(TdgssMan ager.java:40)

at com.teradata.tdgss.jtdgss.TdgssManager.<clinit>(TdgssM anager.java:29)

at com.teradata.jdbc.jdbc.GenericTeraEncrypt.getTDgssVers ion(GenericTeraEncrypt.java:640)

at com.teradata.jdbc.jdbc_4.parcel.ClientConfigParcel.toS tream(ClientConfigParcel.java:54)

at com.teradata.jdbc.jdbc_4.io.TDPacket.addParcel(TDPacke t.java:98)

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

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

at com.teradata.jdbc.jdk6.JDK6_SQL_Connection.<init>(JDK6 _SQL_Connection.java:35)

at com.teradata.jdbc.jdk6.JDK6ConnectionFactory.construct SQLConnection(JDK6ConnectionFactory.java:25)

at com.teradata.jdbc.jdbc.ConnectionFactory.createConnect ion(ConnectionFactory.java:179)

at com.teradata.jdbc.jdbc.ConnectionFactory.createConnect ion(ConnectionFactory.java:169)

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

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

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

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

  java.lang.NoClassDefFoundError: Could not initialize class com.teradata.tdgss.jtdgss.TdgssManager

 

Please suggest the solution

 

tomnolan 594 posts Joined 01/08
11 Mar 2016

That exception is due to tdgssconfig.jar not being accessible on the classpath, as discussed in the Troubleshooting section of the Teradata JDBC Driver User Guide.
http://developer.teradata.com/doc/connectivity/jdbc/reference/current/jdbcug_chapter_5.html#CHDIJJJH
 
In your code snippet, you listed tdgssconfig.jar in the second argument of the JDBC function. That's good.
 
But is the tdgssconfig.jar file actually located in the directory that you specified? And are the operating system permissions set on the tdgssconfig.jar file so that the R program can access the file?
 

gargneha03 2 posts Joined 03/16
14 Mar 2016

 tdgssconfig.jar  is located in the directory that i have specified in the code. Also, i checked that all permissions are granted on  tdgssconfig.jar  file so that R can access it. but i still get following error while running follwoing code:
drv = JDBC("com.teradata.jdbc.TeraDriver","C:\\Users\\ Public\\Desktop\\TeraJDBC__indep_indep.15.00.00.33\\ terajdbc4.jar;C:\\Users\\Public\\Desktop\\ TeraJDBC__indep_indep.15.00.00.33\\tdgssconfig.jar")
conn = dbConnect(drv,"jdbc:teradata://tddev","userid"," password") 
 
Error in .jcall(drv@jdrv, "Ljava/sql/Connection;", "connect", as.character(url)[1],  : 
  java.lang.NoClassDefFoundError: Could not initialize class com.teradata.tdgss.jtdgss.TdgssManager
 
Also, i forgot to mention earlier that when 1st time i tried establishing connection, i was able to. But next time after closing down R session, when i re-opened and re-ran above mentioned code i started getting error.
Please help!

 

tomnolan 594 posts Joined 01/08
14 Mar 2016

If you're a Teradata customer, please open a customer service incident.

24 Mar 2016

There are some extra space characters in your jar file paths:
\\Desktop\\ TeraJDB
There is a white space character before 'Tera'
Please see if this caused the problem.

Raja

You must sign in to leave a comment.