我正在尝试使用 java 中的 jdbc 驱动程序连接到 Aster 服务器。我已经将 Jar 文件添加到类路径中。
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");
}
}
但我收到以下错误。
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