16. Common problems

16.1. Oracle Problems
16.2. MySQL Problems
16.3. SQL Server Problems
16.4. DB2 Problems

16.1. Oracle Problems

16.1.1. Error: "Stream has already been closed"

Due to a bug in Oracle's JDBC driver, you cannot retrieve columns with the LONG or LONG RAW data type if the DBMS_OUTPUT package is enabled. In order to be able to display these columns, the support for DBMS_OUTPUT has to be switched off using the DISABLEOUT command before runnnig a SELECT statement that returns LONG or LONG RAW columns.

16.1.2. BLOB support is not working properly

SQL Workbench/J supports reading and writing BLOB data in various ways. The implementation relies on standard JDBC API calls to work properly in the driver. If you experience problems when updating BLOB columns (e.g. using the enhanced UPDATE, INSERT syntax or the DataPumper) then please check the version of your Oracle JDBC driver. Only 10.x drivers implement the necessary JDBC functions properly. The version of your driver is reported in the log file when you make a connection to your Oracle server.

16.1.3. Table and column comments are not displayed

By default Oracle's JDBC driver does not return comments made on columns or tables (COMMENT ON ..). Thus your comments will not be shown in the database explorer.

To enable the display of column comments, you need to pass the property remarksReporting to the driver.

In the profile dialog, click on the Extended Properties button. Add a new property in the following window with the name remarksReporting and the value true. Now close the dialog by clicking on the OK button.

Turning on this features slows down the retrieval of table information e.g. in the Database Explorer.

When you have comments defined in your Oracle database and use the WbReport command, then you have to enable the remrks reporting, otherwise the comments will not show up in the report.

16.2. MySQL Problems

16.2.1. "Operation not allowed" error message

In case you receive an error message "Operation not allowed after ResultSet closed" please upgrade your JDBC driver to a more recent version. This problem was fixed with the MySQL JDBC driver version 3.1. So upgrading to that or any later version will fix this problem.

16.2.2. Problems with zero dates with MySQL

MySQL allows the user to store invalid dates in the database (0000-00-00). Since version 3.1 of the JDBC driver, the driver will throw an exception when trying to retrieve such an invalid date. This behaviour can be controlled by adding an extended property to the connection profile. The property should be named zeroDateTimeBehavior. You can set this value to either convertToNull or to round. For details see the MySQL site

16.3. SQL Server Problems

16.3.1. Can't start a cloned connection while in manual transaction mode

This error usually occurs in the DbExplorer if an older Microsoft JDBC Driver is used and the connection does not use autocommit mode. There are two ways to fix this problem:

  • Upgrade to a newer Microsoft driver (e.g. the one for SQL Server 2005)
  • Enable autocommit in the connection profile
  • Add the parameter ;SelectMethod=Cursor to your JDBC URL
This article in Microsoft's Knowledgebase gives more information regarding this problem.

The possible parameters for the SQL Server 2005 driver are listed here

16.4. DB2 Problems

16.4.1. "Connection closed" errors

When using the DB2 JDBC drivers it is important that the charsets.jar is part of the used JDK (or JRE). Apparently the DB2 JDBC driver needs this library in order to correctly convert the EBCDIC characterset (used in the database) into the Unicode encoding that is used by Java. The library charsets.jar is usually included in all multi-language JDK/JRE installations.

If you experience intermittent "Connection closed" errors when running SQL statements, please verify that charsets.jar is part of your JDK/JRE installation. This file is usually installed in jre\lib\charsets.jar.