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 FEBRUARY 03, 2019

Applies to:

Oracle Containers for J2EE - Version: 10.1.3.5.0 and later   [Release: AS10gR3 and later ]
Information in this document applies to any platform.

Symptoms

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:

Connection factory class: com.ibm.as400.access.AS400JDBCConnectionPoolDataSource
JDBC URL: jdbc:as400://ouras400hostname


The below FAQ document was usd to configure a connection pool using the IBM Toolbox for Java driver :
http://www-03.ibm.com/systems/i/software/toolbox/faqjdbc.html

Cause

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
  Symptoms
  Cause
  Solution
  References

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

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