I am trying to connect to Aster server with jdbc drivers from java. I have added already the Jar files to the classpath.
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.*;
public class TeradataJDBCConnection {
public static void main(String[] args) throws Exception {
Class.forName("com.asterdata.ncluster.Driver");
String url="jdbc:ncluster://<ip_address>:2406/test";
Connection conn=DriverManager.getConnection(url, "user123", "test");
}
}
But I am getting the below error.
Exception in thread "main" java.sql.SQLException: [AsterData][ASTERJDBCDSII](34) : Failed to connect to 10.99.186.92. Please check the host address. ()
at com.asterdata.ncluster.jdbc.core.NClusterConnection.connect(Unknown Source)
at com.simba.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
at com.simba.jdbc.common.AbstractDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at Tera.TeradataJDBCConnection.main(TeradataJDBCConnection.java:17)
Caused by: com.asterdata.ncluster.jdbc.core.MuleException: [AsterData][ASTERJDBCDSII](34) : Failed to connect to 10.99.186.92. Please check the host address. ()
... 6 more
No bug in the code. Everything is running fine. Download the jdbc driver from here. https://aster-community.teradata.com/docs/DOC-2254