After upgrading to JDK 1.1.2 B(eta) on Solaris all database connections
via a previously working ODBC interface to a Sybase 4.9.2 SQL Server
database stopped working and generates the following error message
SQL Server connection timed out.
The specific details are using the JDK 1.1.2 B(eta) together with
Intersolv's ODBC driver manager (bundled with Solaris) and their drivers
(version 2.11b, 2.11s and 2.2) and connecting to a Sybase 4.9.2 SQL
Server the connection to the database does appear to work anymore.
The following example piece of code demonstrates the failure
import java.sql.*;
import java.util.*;
public class DatabaseDemo {
private static final String url = "jdbc:odbc:dayplanner";
private static final String user = "useruser";
private static final String password = "xxxxxx";
private static final String server = "SAQQARA";
private static final String db = "personplanner";
DatabaseDemo() {
Connection con;
Statement stmt;
ResultSet rs;
Properties prop;
try {
// load driver
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
prop = new Properties();
prop.put("user", user);
prop.put("password", password);
prop.put("server", server);
prop.put("db", db);
// debug - remove
DriverManager.setLogStream(System.out);
con = DriverManager.getConnection(url, prop);
// submit a query
stmt = con.createStatement();
rs = stmt.executeQuery("select name from sysusers");
while (rs.next()) {
System.out.println(rs.getString("name"));
}
} catch (Exception e) {
System.err.println(e);
}
}
public static void main(String args[]) {
new DatabaseDemo();
}
}
The odbc ini file was defined as ..
;
; @(#)odbc.ini 1.1 97/04/09.
;
[ODBC Data Sources]
dayplanner=Dayplanner database on karnak.uk - 4.9.2 Sybase
[dayplanner]
Driver=/opt/ISLIodbc/odbc/dlls/qess08.so
Description=INTERSOLV Sybase Version ODBC Driver
ServerName=SAQQARA
The important bits of the environment used were ;
LD_LIBRARY_PATH= /opt/java/JDK/1.1.2B/lib/sparc/green_threads:
/opt/ISLIodbc/odbc/dlls:
/opt/ISLIodbc/odbc/lib
PATH included the database, and jdk bin directories
CLASSPATH=.:/opt/java/JDK/1.1.2B/lib/classes.zip
The complete error message generated were ;
% java DatabaseDemo
DriverManager.getConnection("jdbc:odbc:dayplanner")
trying driver [className=sun.jdbc.odbc.JdbcOdbcDriver, context=null,
sun.jdbc.odbc.JdbcOdbcDriver @1dc60759]
*Driver.connect (jdbc:odbc:dayplanner)
JDBC to ODBC Bridge: Checking security
No SecurityManager present, assuming trusted application/applet
JDBC to ODBC Bridge 1.1001
Current Date/Time: Tue May 20 17:39:25 GMT+01:00 1997
Loading JdbcOdbc library
Allocating Environment handle (SQLAllocEnv)
hEnv=915672
Allocating Connection handle (SQLAllocConnect)
hDbc=917840
Connecting (SQLDriverConnect), hDbc=917840, szConnStrIn=DSN=dayplanner;UID=dayplan;PWD=dDaAyY
RETCODE = -1
ERROR - Generating SQLException...
SQLException: SQLState(S1T00) vendor code(0)
java.sql.SQLException: [INTERSOLV][ODBC SQL Server driver][SQL Server]SQL Server connection timedout.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:3669)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:3822)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:1037)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:153)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:173)
at java.sql.DriverManager.getConnection(DriverManager.java:91)
at DatabaseDemo.<init>(DatabaseDemo.java:29)
at DatabaseDemo.main(DatabaseDemo.java:44)
Closing connection (SQLFreeConnect), hDbc=917840
Closing environment (SQLFreeEnv), hEnv=915672
getConnection failed: java.sql.SQLException: [INTERSOLV][ODBC SQL Server driver][SQL Server]SQL Server connection timed out.
java.sql.SQLException: [INTERSOLV][ODBC SQL Server driver][SQL Server]SQL Server connection timedout.
via a previously working ODBC interface to a Sybase 4.9.2 SQL Server
database stopped working and generates the following error message
SQL Server connection timed out.
The specific details are using the JDK 1.1.2 B(eta) together with
Intersolv's ODBC driver manager (bundled with Solaris) and their drivers
(version 2.11b, 2.11s and 2.2) and connecting to a Sybase 4.9.2 SQL
Server the connection to the database does appear to work anymore.
The following example piece of code demonstrates the failure
import java.sql.*;
import java.util.*;
public class DatabaseDemo {
private static final String url = "jdbc:odbc:dayplanner";
private static final String user = "useruser";
private static final String password = "xxxxxx";
private static final String server = "SAQQARA";
private static final String db = "personplanner";
DatabaseDemo() {
Connection con;
Statement stmt;
ResultSet rs;
Properties prop;
try {
// load driver
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
prop = new Properties();
prop.put("user", user);
prop.put("password", password);
prop.put("server", server);
prop.put("db", db);
// debug - remove
DriverManager.setLogStream(System.out);
con = DriverManager.getConnection(url, prop);
// submit a query
stmt = con.createStatement();
rs = stmt.executeQuery("select name from sysusers");
while (rs.next()) {
System.out.println(rs.getString("name"));
}
} catch (Exception e) {
System.err.println(e);
}
}
public static void main(String args[]) {
new DatabaseDemo();
}
}
The odbc ini file was defined as ..
;
; @(#)odbc.ini 1.1 97/04/09.
;
[ODBC Data Sources]
dayplanner=Dayplanner database on karnak.uk - 4.9.2 Sybase
[dayplanner]
Driver=/opt/ISLIodbc/odbc/dlls/qess08.so
Description=INTERSOLV Sybase Version ODBC Driver
ServerName=SAQQARA
The important bits of the environment used were ;
LD_LIBRARY_PATH= /opt/java/JDK/1.1.2B/lib/sparc/green_threads:
/opt/ISLIodbc/odbc/dlls:
/opt/ISLIodbc/odbc/lib
PATH included the database, and jdk bin directories
CLASSPATH=.:/opt/java/JDK/1.1.2B/lib/classes.zip
The complete error message generated were ;
% java DatabaseDemo
DriverManager.getConnection("jdbc:odbc:dayplanner")
trying driver [className=sun.jdbc.odbc.JdbcOdbcDriver, context=null,
sun.jdbc.odbc.JdbcOdbcDriver @1dc60759]
*Driver.connect (jdbc:odbc:dayplanner)
JDBC to ODBC Bridge: Checking security
No SecurityManager present, assuming trusted application/applet
JDBC to ODBC Bridge 1.1001
Current Date/Time: Tue May 20 17:39:25 GMT+01:00 1997
Loading JdbcOdbc library
Allocating Environment handle (SQLAllocEnv)
hEnv=915672
Allocating Connection handle (SQLAllocConnect)
hDbc=917840
Connecting (SQLDriverConnect), hDbc=917840, szConnStrIn=DSN=dayplanner;UID=dayplan;PWD=dDaAyY
RETCODE = -1
ERROR - Generating SQLException...
SQLException: SQLState(S1T00) vendor code(0)
java.sql.SQLException: [INTERSOLV][ODBC SQL Server driver][SQL Server]SQL Server connection timedout.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:3669)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:3822)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:1037)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:153)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:173)
at java.sql.DriverManager.getConnection(DriverManager.java:91)
at DatabaseDemo.<init>(DatabaseDemo.java:29)
at DatabaseDemo.main(DatabaseDemo.java:44)
Closing connection (SQLFreeConnect), hDbc=917840
Closing environment (SQLFreeEnv), hEnv=915672
getConnection failed: java.sql.SQLException: [INTERSOLV][ODBC SQL Server driver][SQL Server]SQL Server connection timed out.
java.sql.SQLException: [INTERSOLV][ODBC SQL Server driver][SQL Server]SQL Server connection timedout.