something went sideways when I updated Java

440 views
Skip to first unread message

Wes Howard

unread,
May 21, 2012, 2:44:24 PM5/21/12
to SQL Workbench/J - DBMS independent SQL tool
Updated my Java the other day and now SQL WB is not connecting. How do
I get it back to the working again? Note the final error in the After
log where it would not even let me click the SQL Workbench URL in the
about box.

The Before:
2012-05-17 09:27 INFO Using configdir: C:\Users\Administrator
\.sqlworkbench
2012-05-17 09:27 INFO Starting SQL Workbench/J, Build 110 (2011-02-13
11:50)
2012-05-17 09:27 INFO Java version=1.6.0_24, java.home=C:\Program
Files\Java\jre6, vendor=Sun Microsystems Inc.
2012-05-17 09:27 INFO Operating System=Windows 7, version=6.1,
platform=amd64
2012-05-17 09:27 INFO New dev build available
2012-05-17 09:27 INFO Creating new connection for [{Meta Servers}/
MetaDB1] for driver=oracle.jdbc.driver.OracleDriver
2012-05-17 09:27 INFO Adding ClassLoader URL=file:/C:/Users/
Administrator/Squirrel-SQL/ojdbc14.jar
2012-05-17 09:27 INFO Using DBID=oracle
2012-05-17 09:27 INFO Connected to: [Oracle], Database version:
[Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 -
Production
With the Partitioning, OLAP and Data Mining options], Driver version:
[10.2.0.1.0], JDBC Version: [10.2], ID: [Wb1-2]

The After:
2012-05-21 13:26 INFO =================== Log started
===================
2012-05-21 13:26 INFO Using configdir: C:\Users\Administrator
\.sqlworkbench
2012-05-21 13:26 INFO Starting SQL Workbench/J, Build 110 (2011-02-13
11:50)
2012-05-21 13:26 INFO Java version=1.7.0_04, java.home=C:\Program
Files\Java\jre7, vendor=Oracle Corporation
2012-05-21 13:26 INFO Operating System=Windows 7, version=6.1,
platform=amd64
2012-05-21 13:26 INFO Creating new connection for [{Meta Servers}/
Boot DB] for driver=oracle.jdbc.driver.OracleDriver
2012-05-21 13:26 INFO Adding ClassLoader URL=file:/C:/Users/
Administrator/SQL%20Workbench/ojdbc14.jar
2012-05-21 13:26 ERROR Error connecting to driver
oracle.jdbc.driver.OracleDriver Io exception: The Network Adapter
could not establish the connection [DB Errorcode=17002]
2012-05-21 13:26 ERROR SQL Exception when connecting Error connecting
to database. (java.sql.SQLException - Io exception: The Network
Adapter could not establish the connection)
2012-05-21 13:36 INFO Creating new connection for [{Meta Servers}/
Boot DB] for driver=oracle.jdbc.driver.OracleDriver
2012-05-21 13:36 INFO Adding ClassLoader URL=file:/C:/Users/
Administrator/Squirrel-SQL/ojdbc14.jar
2012-05-21 13:36 ERROR Error connecting to driver
oracle.jdbc.driver.OracleDriver Io exception: The Network Adapter
could not establish the connection [DB Errorcode=17002]
2012-05-21 13:36 ERROR SQL Exception when connecting Error connecting
to database. (java.sql.SQLException - Io exception: The Network
Adapter could not establish the connection)
2012-05-21 13:37 INFO Creating new connection for [{Meta Servers}/
Boot DB] for driver=oracle.jdbc.driver.OracleDriver
2012-05-21 13:37 INFO Adding ClassLoader URL=file:/C:/Users/
Administrator/SQL%20Workbench/ojdbc14.jar
2012-05-21 13:37 ERROR Error connecting to driver
oracle.jdbc.driver.OracleDriver Io exception: The Network Adapter
could not establish the connection [DB Errorcode=17002]
2012-05-21 13:37 ERROR SQL Exception when connecting Error connecting
to database. (java.sql.SQLException - Io exception: The Network
Adapter could not establish the connection)
2012-05-21 13:38 ERROR Error starting browser Failed to open
http://www.sql-workbench.net. Error message: The system cannot write
to the specified device.
2012-05-21 13:38 ERROR Error starting browser Failed to open
http://www.sql-workbench.net. Error message: The system cannot write
to the specified device

Thomas Kellerer

unread,
May 21, 2012, 3:02:15 PM5/21/12
to sql-wo...@googlegroups.com
Hi,

this error:

> 2012-05-21 13:26 ERROR Error connecting to driver
> oracle.jdbc.driver.OracleDriver Io exception: The Network Adapter
> could not establish the connection [DB Errorcode=17002]

indicates some network problem.
Is it possible that the new java.exe installation is not allowed through your desktop firewall?

This one here:

> 2012-05-21 13:38 ERROR Error starting browser Failed to open
> http://www.sql-workbench.net. Error message: The system cannot write
> to the specified device

Seems very strange. Can you set the loglevel to DEBUG and try this again please?
This is a standard Java/JDK call to open the system browser. I can't think of a reason this fails with a new Java version.

You might also try the current dev build to rule out any problems with the version of SQL Workbench itself (although I don't think anything has changed in that area in the last year).

Regards
Thomas

Wes Howard

unread,
May 21, 2012, 3:17:24 PM5/21/12
to SQL Workbench/J - DBMS independent SQL tool
A very real possibility that had not occured to me. I will have to
check on how to correct that, hints are welcome.

2012-05-21 14:15 INFO =================== Log started
===================
2012-05-21 14:15 INFO Using configdir: C:\Users\Administrator
\.sqlworkbench
2012-05-21 14:15 INFO Starting SQL Workbench/J, Build 110 (2011-02-13
11:50)
2012-05-21 14:15 INFO Java version=1.7.0_04, java.home=C:\Program
Files\Java\jre7, vendor=Oracle Corporation
2012-05-21 14:15 INFO Operating System=Windows 7, version=6.1,
platform=amd64
2012-05-21 14:15 INFO Creating new connection for [{Meta Servers}/
XXX] for driver=oracle.jdbc.driver.OracleDriver
2012-05-21 14:15 INFO Adding ClassLoader URL=file:/C:/Users/
Administrator/SQL%20Workbench/ojdbc14.jar
2012-05-21 14:15 ERROR Error connecting to driver
oracle.jdbc.driver.OracleDriver Io exception: The Network Adapter
could not establish the connection [DB Errorcode=17002]
java.sql.SQLException: Io exception: The Network Adapter could not
establish the connection
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:
112)
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:
146)
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:
255)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
at
oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:
414)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:
35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at workbench.db.DbDriver.connect(DbDriver.java:334)
at workbench.db.ConnectionMgr.connect(ConnectionMgr.java:156)
at workbench.db.ConnectionMgr.getConnection(ConnectionMgr.java:109)
at
workbench.gui.components.ConnectionSelector.doConnect(ConnectionSelector.java:
196)
at workbench.gui.components.ConnectionSelector
$2.run(ConnectionSelector.java:116)

2012-05-21 14:15 ERROR SQL Exception when connecting Error connecting
to database. (java.sql.SQLException - Io exception: The Network
Adapter could not establish the connection)
java.sql.SQLException: Error connecting to database.
(java.sql.SQLException - Io exception: The Network Adapter could not
establish the connection)
at workbench.db.DbDriver.connect(DbDriver.java:366)
at workbench.db.ConnectionMgr.connect(ConnectionMgr.java:156)
at workbench.db.ConnectionMgr.getConnection(ConnectionMgr.java:109)
at
workbench.gui.components.ConnectionSelector.doConnect(ConnectionSelector.java:
196)
at workbench.gui.components.ConnectionSelector
$2.run(ConnectionSelector.java:116)

On May 21, 2:02 pm, Thomas Kellerer <google-gro...@sql-workbench.net>
wrote:

Thomas Kellerer

unread,
May 21, 2012, 3:27:21 PM5/21/12
to sql-wo...@googlegroups.com

What about opening the homepage?

> 2012-05-21 13:38 ERROR Error starting browser Failed to open
> http://www.sql-workbench.net. Error message: The system cannot write
> to the specified device

The debug level is more interesting for that failure.

Regards
Thomas

Wes Howard

unread,
May 21, 2012, 3:47:34 PM5/21/12
to SQL Workbench/J - DBMS independent SQL tool
> You might also try the current dev build to rule out any problems with the version of SQL Workbench itself (although I don't think anything has changed in that area in the last year).

I did dl and install the latest stable, i was at 110 and i got 112 i
think. I will try the latest dev build as well.

Checked settings in my fw and even reset it for SQL WB to ask on next
use (Symantec btw) and then restarted and got no query. This makes me
wonder if the issue was with reaching the nic more than with the nic
sending a req out over the wire.

I had uninstalled jre 6 and put on only 7 the other day to test
something for work, should note in this that i reinstalled 6 in my
efforts to resolve this.



On May 21, 2:02 pm, Thomas Kellerer <google-gro...@sql-workbench.net>
wrote:

Wes Howard

unread,
May 21, 2012, 3:54:57 PM5/21/12
to SQL Workbench/J - DBMS independent SQL tool
Slight change of symptoms - it now will go to the url from the About
box. It will not connect and check version age though.


2012-05-21 14:51 INFO =================== Log started
===================
2012-05-21 14:51 INFO Using configdir: C:\Users\Administrator
\.sqlworkbench
2012-05-21 14:51 INFO Starting SQL Workbench/J, Build 110 (2011-02-13
11:50)
2012-05-21 14:51 INFO Java version=1.7.0_04, java.home=C:\Program
Files\Java\jre7, vendor=Oracle Corporation
2012-05-21 14:51 INFO Operating System=Windows 7, version=6.1,
platform=amd64
2012-05-21 14:51 INFO Creating new connection for [{Meta Servers}/
XXX] for driver=oracle.jdbc.driver.OracleDriver
2012-05-21 14:51 INFO Adding ClassLoader URL=file:/C:/Users/
Administrator/SQL%20Workbench/ojdbc14.jar
2012-05-21 14:51 ERROR Error connecting to driver
2012-05-21 14:51 ERROR SQL Exception when connecting Error connecting
to database. (java.sql.SQLException - Io exception: The Network
Adapter could not establish the connection)
java.sql.SQLException: Error connecting to database.
(java.sql.SQLException - Io exception: The Network Adapter could not
establish the connection)
at workbench.db.DbDriver.connect(DbDriver.java:366)
at workbench.db.ConnectionMgr.connect(ConnectionMgr.java:156)
at workbench.db.ConnectionMgr.getConnection(ConnectionMgr.java:109)
at
workbench.gui.components.ConnectionSelector.doConnect(ConnectionSelector.java:
196)
at workbench.gui.components.ConnectionSelector
$2.run(ConnectionSelector.java:116)

2012-05-21 14:51 DEBUG Opening URL: http://www.sql-workbench.net
2012-05-21 14:52 WARN Could not read version information Permission
denied: connect
java.net.SocketException: Permission denied: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
at workbench.util.WbVersionReader.readBuildInfo(WbVersionReader.java:
98)
at workbench.util.WbVersionReader.access$000(WbVersionReader.java:29)
at workbench.util.WbVersionReader$1.run(WbVersionReader.java:75)

On May 21, 2:27 pm, Thomas Kellerer <google-gro...@sql-workbench.net>
wrote:

Thomas Kellerer

unread,
May 21, 2012, 3:55:35 PM5/21/12
to sql-wo...@googlegroups.com

I just saw this entry now:

> 2012-05-21 14:15 INFO Adding ClassLoader URL=file:/C:/Users/
> Administrator/SQL%20Workbench/ojdbc14.jar

Using an outdated driver might be a problem. ojdbc14.jar is intended for Java 1.4
Maybe it simply doesn't work with Java 7 any more.

You should grab a current ojdbc6.jar from the Oracle website and try with that one.

Regards
Thomas

Thomas Kellerer

unread,
May 21, 2012, 3:58:49 PM5/21/12
to sql-wo...@googlegroups.com
> 2012-05-21 14:51 DEBUG Opening URL: http://www.sql-workbench.net
> 2012-05-21 14:52 WARN Could not read version information Permission
> denied: connect
> java.net.SocketException: Permission denied: connect
> at java.net.DualStackPlainSocketImpl.connect0(Native Method)

Did you configure a proxy connection to be used by Java in the Control Panel?
Maybe you did that for the Java6 installation but not for the Java7 installation?

I also wonder if this might have something to do with a differen IPv4 vs. IPv6 handling in Java7

Regards
Thomas

Wes Howard

unread,
May 22, 2012, 10:36:41 AM5/22/12
to SQL Workbench/J - DBMS independent SQL tool
FW is all good, everything there as it should be and using Java (all
versions) to connect through it. Observing FW while connection attempt
is made there is no traffic blocked or passed.

Tested with another Java based SQL tool (Squirell) and had same
results as before.

Tested with "C:\Program Files\Java\jre6\bin\java.exe" -
Dworkbench.log.level=DEBUG -jar sqlworkbench.jar :
With ojdbc6.jar the connection spun it's wheels but no error and no
connection.

With ojdbc14.jar connection was successful.

Seems the fatal flaw was 7. In the end I am back to JRE 6 (although a
later release than I started with) and the same jdbc driver and it is
working.


On May 21, 2:58 pm, Thomas Kellerer <google-gro...@sql-workbench.net>
wrote:

Thomas Kellerer

unread,
May 22, 2012, 10:51:42 AM5/22/12
to sql-wo...@googlegroups.com
This sounds very strange.

I have no problems with Java7 neither on a 32bit System nor on a 64bit system (using a 64bit Java Runtime).

This is how it looks on my computer:

2012-05-22 16:47 INFO =================== Log started ===================
2012-05-22 16:47 INFO Using configdir: c:\Projects\sqlworkbench\conf
2012-05-22 16:47 INFO Starting SQL Workbench/J, Build 112.7 (2012-05-22 14:53)
2012-05-22 16:47 INFO Java version=1.7.0_04, java.home=c:\Program Files\Java\jre7, vendor=Oracle Corporation, name=Java HotSpot(TM) 64-Bit Server VM
2012-05-22 16:47 INFO Operating System=Windows 7, version=6.1, platform=amd64
2012-05-22 16:47 INFO Creating new connection for [Oracle10] for driver=oracle.jdbc.OracleDriver
2012-05-22 16:47 INFO Adding ClassLoader URL=file:/C:/etc/libs/oracle/ojdbc14-10.2.0.1.jar
2012-05-22 16:47 INFO Using DBID=oracle
2012-05-22 16:47 INFO Connected to: [Oracle], Database version: [Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options], Driver version: [10.2.0.1.0], JDBC Version: [10.2], ID: [Wb1-5]

From the logfile it seems you are running a 32bit JVM on a 64bit system. Maybe that's the problem.
Did you try a 64bit Java Runtime?


Regards
Thomas

Wes Howard, 22.05.2012 16:36:
Reply all
Reply to author
Forward
0 new messages