Error: Process "hangs" while connecting to DB2 database with AS400 JDBC driver

Document created by chris_stevens Employee on May 11, 2016
Version 1Show Document
  • View in full screen mode

Symptom

When attempting to connect to a DB2 database using the com.ibm.as400.access.AS400JDBCDriver JDBC driver, the process "hangs" and becomes unresponsive.

 

Cause

In the Atom container log there is an exception similar to:

"LocalProcessExec-thread-4" Id=80 WAITING on java.awt.Component$AWTTreeLock@13eda1a1

               at java.lang.Object.wait(Native Method)

               -  waiting on java.awt.Component$AWTTreeLock@13eda1a1

               ...

The problem may be caused by invalid connection information such as incorrect credentials. If this is the case, by default the driver will attempt to display a warning dialog to an end user and await input however there is no end user in the context of connecting through the database connector.

 

Solution

To resolve this the driver supports unattended connections with a connection string property to disable the dialog. This allows errors to be returned to the database connector and displayed through AtomSphere.

 

In the database connection append the following to the Connection URL:

jdbc:as400://<HOSTNAME>/<DEFAULT-SCHEMA>;prompt=false

Reference: https://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/rzahh/javadoc/JDBCProperties.html

1 person found this helpful

Attachments

    Outcomes