Здравствуйте.
Пробую выполнить подключение к SAS MetaDataServer и получаю ошибку
java.sql.SQLException: Unable to establish a connection: Unable to return workspace. The client has connected to a SAS (9.2) Metadata Server (v1.0) when it intended to connect to a SAS Workspace Server.
<%
Connection connection;
Properties props;
Statement statement;
/* SAS datasets can be queried with a SQL statement itself */
String queryString = "SELECT username FROM MySasLib.users1 t1";
ResultSet result;
String id;
String name;
int i=1;
try {
// CONNECT TO THE SERVER BY USING A CONNECTION PROPERTY LIST
try
{
Class.forName("com.sas.rio.MVADriver");
} catch (ClassNotFoundException e)
{
System.out.println(e.getMessage());
}
props = new Properties();
props.setProperty("user", "user1");
props.setProperty("password", "pwd1");
props.setProperty("librefs", "mySasLib '/sas/dwh/user1/';");
/* SAS libref and library name */
//ACCESS DATA
connection = DriverManager.getConnection("jdbc:sasiom://server.inside.my.ru:8000", props);
statement = connection.createStatement();
result = statement.executeQuery(queryString);
ResultSetMetaData rsmd = result.getMetaData();
int colCount = rsmd.getColumnCount();
out.println("<TABLE border='1'>");
out.println("<TR>");
for (i = 1; i <= colCount; ++i) {
out.println("<TH>" + rsmd.getColumnLabel(i) + "</TH>");
}
out.println("</TR>");
String val = null;
while (result.next()) {
out.print("<TR>");
for (i = 1; i <= colCount; ++i) {
val = result.getString(i);
if (result.wasNull()) {
val = nbsp;
}
out.print("<TD>" + val + "</TD>");
}
out.println("</TR>");
}
out.println("</TABLE>");
statement.close();
connection.close();
} catch (Exception e) {
out.println("error " + e);
}
%>
Подскажите как корректно подключиться?