Name: gm110360 Date: 04/18/2003
FULL PRODUCT VERSION :
Sorry, I've uninstalled for testing regression to with 1.4.1_02. Didn't work.
FULL OS VERSION :
Microsoft Windows 2000 [Versão 5.00.2195]
EXTRA RELEVANT SYSTEM CONFIGURATION :
Win2K pt_BR, Sp3, All post fixes, JDK 1.4.2-beta complete install, NetBeans 3.4.1 or 3.5 Beta 20030403, SapDB 7.4.3.17 with latest JDBC driver 7.4.4 Build 001-000-156-985.
A DESCRIPTION OF THE PROBLEM :
When using SapDB JDBC Driver, trying to connect using JDK 1.4.2-Beta, I get following error:
package com.sap.dbtech.jdbc, SAP DB JDBC Driver, SAP AG, 7.4.4 Build 001-000-156-902 on Java 1.4.2-beta
new Connection 'jdbc:sapdb://SQLMGR/MGRDEV'
new RTEException: -813 Cannot connect to host SQLMGR [Unrecognized Windows Sockets error: 10106: create], -813.
When debugging app, I get no error (I can connect).
Environment: NetBeans 3.4.1 or NetBeans 3.5 Beta.
Uninstalling JDK 1.4.2-Beta and re-installing 1.4.1_02 doesn't solve the problem.
Remote machine with JDK 1.4.1_02 can connect (default execution with Hotstop and debug execution), so: Database Server is running; machine name is correct; there is no firewall.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just open an project in NetBeans that connect with database using JDBC for SapDB.
EXPECTED VERSUS ACTUAL BEHAVIOR :
Get the connection is execution and in debugging (actual: only debugging works).
Works in debugging, not in execution (standard) mode.
Message when debugging (from log):
package com.sap.dbtech.jdbc, SAP DB JDBC Driver, SAP AG, 7.4.4 Build 001-000-156-985 on Java 1.4.2-beta
new Connection 'jdbc:sapdb://SQLMGR/MGRDEV'
using com.sap.dbtech.rte.comm.SocketComm@fe0fd9 on Socket[addr=SQLMGR/200.102.203.4,port=7210,localport=1066]
Message when running (from log):
package com.sap.dbtech.jdbc, SAP DB JDBC Driver, SAP AG, 7.4.4 Build 001-000-156-902 on Java 1.4.2-beta
new Connection 'jdbc:sapdb://SQLMGR/MGRDEV'
new RTEException: -813 Cannot connect to host SQLMGR [Unrecognized Windows Sockets error: 10106: create], -813.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
com.sap.dbtech.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: Cannot connect to jdbc:sapdb://SQLMGR/MGRDEV [Cannot connect to host SQLMGR [Unrecognized Windows Sockets error: 10106: create], -813.].
at com.sap.dbtech.jdbc.DriverSapDB.connect(DriverSapDB.java:177)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at br.com.mgr.TestConnect.<init>(TestConnect.java:25)
at br.com.mgr.TestConnect.main(TestConnect.java:42)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package br.com.mgr;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
public class TestConnect {
public TestConnect() {
try {
Class.forName( "com.sap.dbtech.jdbc.DriverSapDB" );
Connection cn = DriverManager.getConnection( "jdbc:sapdb://SQLMGR/MGRDEV", "MGR", "mgr" );
System.out.println("Connection get");
Statement st = cn.createStatement();
ResultSet rs = st.executeQuery( "select * from TB_PESSOAFJ" );
rs.close();
st.close();
cn.close();
System.out.println("Connection closed");
} catch( Exception e ) {
e.printStackTrace();
}
}
public static void main(String[] args) {
new TestConnect();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
There is none.
(Review ID: 183814)
======================================================================