My Oracle Support Banner

Exception occurred testing connection. Exception: java.awt.HeadlessException Trying to Connect from Oracle Application Server to DB2 Database (Doc ID 1265825.1)

Last updated on OCTOBER 18, 2021

Applies to:

Oracle Containers for J2EE - Version and later
Information in this document applies to any platform.


Trying to set up an AS/400 (DB2) database connection from Oracle Application Server 10.1.3.
JDeveloper was set up by adding the needed jar (jt400.jar) in %JDEVHOME%/jdbc/lib with no errors, and table definitions and data can be viewed.

After setting up a connection pool on the application server by adding jt400.jar to $ORACLE_HOME/j2ee/OC4J_1/applib and restarting the instance, the connection pool was created, but testing the connection pool in Application Server Control gives the error:

Unable to establish connection to "myNewPool" for one or more OC4J instances in the group.

Below are the results for each OC4J instance:

Failed due to error: "Exception occurred testing connection. Exception: java.awt.HeadlessException."

The toolbox jar was added and setup the connection pool using:

The below FAQ document was used to configure a connection pool using the IBM Toolbox for Java driver :




To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.