All Forums Connectivity
kalatp 6 posts Joined 05/10
01 Jun 2010
DriverManager.getConnection() method error while using Teradatd driver

hi ,

I am new to Teradata. I am trying to connect to Teradata DB using teradata driver. i am getting Error in DriverManager.getConnection() Method. I am not able to understand why this is comming. I have tried with the latest driver avaliable in net for teradata.

String url="jdbc:teradata:///AMRROCD"
Properties x = new Properties();
Connection con = DriverManager.getConnection (url, x);--> I am getting Null Pointer Exception at this line .

could anyone help me. I am trying to run this code in Unix environment

I am able to execute the same code through windows OS.

i have set classpath for terajdbc4.jar

Thanks in Advance

tomnolan 594 posts Joined 01/08
01 Jun 2010

First, your connection URL is incorrect. You listed 3 slashes in your URL -- jdbc:teradata:///AMRROCD

But you must have only 2 slashes after the second colon in your URL -- it should be jdbc:teradata://AMRROCD

Second, you said "i have set classpath for terajdbc4.jar", but you need tdgssconfig.jar on your classpath also.

You didn't provide the stack trace for your NullPointerException, but if your NullPointerException is occurring at com.teradata.tdgss.jtdgss.TdgssConfigApi.GetMechanisms , then that problem is due to due to tdgssconfig.jar not being available -- either not listed on your classpath, or the file is not present.

You must sign in to leave a comment.