Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.

14 views
Skip to first unread message

earn earmearn via JavaKB.com

unread,
Mar 31, 2005, 8:43:25 AM3/31/05
to
I'm using JBuilder X, writing a client application and connecting to
database
SQL Server 2000 with JDBC driver.

i have windows xp pro service pack 2
i have this error

[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.

See com.borland.dx.dataset.DataSetException error code: BASE+66

com.borland.dx.dataset.DataSetException: [Microsoft][SQLServer 2000 Driver
for JDBC]Error establishing socket.

at com.borland.dx.dataset.DataSetException.a(Unknown Source)

at com.borland.dx.dataset.DataSetException.throwException(Unknown Source)

at com.borland.dx.dataset.DataSetException.SQLException(Unknown Source)

at com.borland.dx.sql.dataset.Database.openConnection(Unknown Source)

at com.borland.dx.sql.dataset.Database.createPreparedStatement(Unknown
Source)

at com.borland.dx.sql.dataset.o.a(Unknown Source)

at com.borland.dx.sql.dataset.o.d(Unknown Source)

at com.borland.dx.sql.dataset.o.f(Unknown Source)

at com.borland.dx.sql.dataset.QueryProvider.e(Unknown Source)

at com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)

at com.borland.dx.dataset.StorageDataSet.refresh(Unknown Source)

at com.borland.dx.sql.dataset.QueryDataSet.refresh(Unknown Source)

at com.borland.dx.sql.dataset.QueryDataSet.executeQuery(Unknown Source)

at prog.Login.buttonControl1_actionPerformed(Login.java:131)

at prog.Login.buttonControl1_keyReleased(Login.java:207)

at prog.Login$2.keyReleased(Login.java:79)

at java.awt.AWTEventMulticaster.keyReleased(AWTEventMulticaster.java:201)

at java.awt.Component.processKeyEvent(Component.java:3680)

at javax.swing.JComponent.processKeyEvent(JComponent.java:2014)

at java.awt.Component.processEvent(Component.java:3553)

at java.awt.Container.processEvent(Container.java:1164)

at java.awt.Component.dispatchEventImpl(Component.java:2593)

at java.awt.Container.dispatchEventImpl(Container.java:1213)

at java.awt.Component.dispatchEvent(Component.java:2497)

at java.awt.LightweightDispatcher.processKeyEvent(Container.java:2155)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2135)

at java.awt.Container.dispatchEventImpl(Container.java:1200)

at java.awt.Window.dispatchEventImpl(Window.java:914)

at java.awt.Component.dispatchEvent(Component.java:2497)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)

at
java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchThread.java:131)

at
java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:98)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

Chained exception:

java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error
establishing socket.

at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)

at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)

at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)

at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)

at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
Source)

at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
Source)

at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)

at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)

at java.sql.DriverManager.getConnection(DriverManager.java:517)

at java.sql.DriverManager.getConnection(DriverManager.java:177)

at com.borland.dx.sql.dataset.Database.openConnection(Unknown Source)

at com.borland.dx.sql.dataset.Database.createPreparedStatement(Unknown
Source)

at com.borland.dx.sql.dataset.o.a(Unknown Source)

at com.borland.dx.sql.dataset.o.d(Unknown Source)

at com.borland.dx.sql.dataset.o.f(Unknown Source)

at com.borland.dx.sql.dataset.QueryProvider.e(Unknown Source)

at com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)

at com.borland.dx.dataset.StorageDataSet.refresh(Unknown Source)

at com.borland.dx.sql.dataset.QueryDataSet.refresh(Unknown Source)

at com.borland.dx.sql.dataset.QueryDataSet.executeQuery(Unknown Source)

at prog.Login.buttonControl1_actionPerformed(Login.java:131)

at prog.Login.buttonControl1_keyReleased(Login.java:207)

at prog.Login$2.keyReleased(Login.java:79)

at java.awt.AWTEventMulticaster.keyReleased(AWTEventMulticaster.java:201)

at java.awt.Component.processKeyEvent(Component.java:3680)

at javax.swing.JComponent.processKeyEvent(JComponent.java:2014)

at java.awt.Component.processEvent(Component.java:3553)

at java.awt.Container.processEvent(Container.java:1164)

at java.awt.Component.dispatchEventImpl(Component.java:2593)

at java.awt.Container.dispatchEventImpl(Container.java:1213)

at java.awt.Component.dispatchEvent(Component.java:2497)

at java.awt.LightweightDispatcher.processKeyEvent(Container.java:2155)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2135)

at java.awt.Container.dispatchEventImpl(Container.java:1200)

at java.awt.Window.dispatchEventImpl(Window.java:914)

at java.awt.Component.dispatchEvent(Component.java:2497)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)

at
java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchThread.java:131)

at
java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:98)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

ava.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error
establishing socket.

at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)

at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)

at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)

at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)

at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
Source)

at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
Source)

at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)

at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)

at java.sql.DriverManager.getConnection(DriverManager.java:517)

at java.sql.DriverManager.getConnection(DriverManager.java:177)

at com.borland.dx.sql.dataset.Database.openConnection(Unknown Source)

at com.borland.dx.sql.dataset.Database.createPreparedStatement(Unknown
Source)

at com.borland.dx.sql.dataset.o.a(Unknown Source)

at com.borland.dx.sql.dataset.o.d(Unknown Source)

at com.borland.dx.sql.dataset.o.f(Unknown Source)

at com.borland.dx.sql.dataset.QueryProvider.e(Unknown Source)

at com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)

at com.borland.dx.dataset.StorageDataSet.refresh(Unknown Source)

at com.borland.dx.sql.dataset.QueryDataSet.refresh(Unknown Source)

at com.borland.dx.sql.dataset.QueryDataSet.executeQuery(Unknown Source)

at prog.Login.buttonControl1_actionPerformed(Login.java:131)

at prog.Login.buttonControl1_keyReleased(Login.java:207)

at prog.Login$2.keyReleased(Login.java:79)

at java.awt.AWTEventMulticaster.keyReleased(AWTEventMulticaster.java:201)

at java.awt.Component.processKeyEvent(Component.java:3680)

at javax.swing.JComponent.processKeyEvent(JComponent.java:2014)

at java.awt.Component.processEvent(Component.java:3553)

at java.awt.Container.processEvent(Container.java:1164)

at java.awt.Component.dispatchEventImpl(Component.java:2593)

at java.awt.Container.dispatchEventImpl(Container.java:1213)

at java.awt.Component.dispatchEvent(Component.java:2497)

at java.awt.LightweightDispatcher.processKeyEvent(Container.java:2155)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2135)

at java.awt.Container.dispatchEventImpl(Container.java:1200)

at java.awt.Window.dispatchEventImpl(Window.java:914)

at java.awt.Component.dispatchEvent(Component.java:2497)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)

at
java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchThread.java:131)

at
java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:98)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

Thanks very much!

--
Message posted via http://www.javakb.com

David Harper

unread,
Mar 31, 2005, 10:56:12 AM3/31/05
to
> Error establishing socket.

This tells you that the client program could not connect to the database
server via a TCP/IP socket.

That suggests to me that one of the following is true:

1. You have not specified the hostname of the database server correctly
in the JDBC URL.

2. You have not specified the port number of the database server
correctly in the JDBC URL.

3. Your database server is not running.

4. Your database server is behind a firewall which forbids your client
program from connecting to it.

> i have windows xp pro service pack 2

You have my deepest sympathy. Perhaps the "enhanced security" in SP2 is
preventing your client from connecting to the server?

David Harper
Cambridge

earn earmearn via JavaKB.com

unread,
Apr 1, 2005, 1:37:23 AM4/1/05
to
when i have Windows Xp Pro with service Pack 1
i don't have a problem
all works

now with Windows Xp Pro with service Pack 2 i have this problem

[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.


any ideas???????

David Harper

unread,
Apr 2, 2005, 7:01:29 AM4/2/05
to
> when i have Windows Xp Pro with service Pack 1
> i don't have a problem
> all works
>
> now with Windows Xp Pro with service Pack 2 i have this problem
>
> [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
>
>
> any ideas???????

It definitely sounds like the enhanced firewall settings in SP2 are the
cause of your problems.

Most good firewalls block ports associated with Microsoft server
products, because these products are inherently insecure, and they make
the host machine very vulnerable to being taken over remotely by
malicious software.

That's the problem that SP2 was intended to fix, but it has the
unfortunate side-effect of preventing some classes of legitimate network
access, such as your client program needing to connect to your database
server.

Please don't ask me for detailed instructions. I dumped Microsoft eight
years ago in favour of Linux :-)

David Harper
Cambridge, England

earn earmearn via JavaKB.com

unread,
Apr 4, 2005, 4:19:06 AM4/4/05
to
thanks

the firewall it is my problem

now all works again

Luis Ure?a via JavaKB.com

unread,
Apr 4, 2005, 12:09:12 PM4/4/05
to
Hi,

I have the same problem, but I'm checking the following and all is correct!!
,

1) I have the URL:
"jdbc:microsoft:sqlserver://192.168.1.31:1433;DatabaseName=schndb;user=sa;password=x0311nsr"

2) The windows firewall is disabled.

3) The windows firewall have an exception port 1433

4) My database is running !!

How could I check the SQL Server service pack number that I have been
installed?

What else could I check ???

Thanks very much

0 new messages