Today, try to connect Teradata directly with JDBC, and quote the following error:
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:54) 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:512) at Java.sql.DriverManager . getconnection (drivermanager.java:171) at Myservlet. Action.main (action.java:48)
After a while, I found that the original Teradata need 3 packages, and I only gave 1 packages.
Terajdbc4.jar
Tdgssjava.jar
Tdgssconfig.jar
To tell you the truth, I think Teradata's design of JDBC as 3 packages may be a flaw, unfriendly to beginners.