Resolve exception while trying to connect to DataSource: AS400: java.awt.HeadlessException in Spectrum

Products Affected: Spectrum Technology Platform
Product Feature: JDBC Drivers
Operating System: Windows 2008 R2
Database: AS400


 

Issue

Customer is getting the following error message after creating a connection to an AS400 database in the Management Console:
 
User-added image
By default, the server/bin/wrapper/wrapper.conf file should have the configuration indicating java is running in headless mode (wrapper.java.additional.3=-Djava.awt.headless=true). Customer's wrapper.java.additional.3=-Djava.awt.headless is set to true.

Their username, password, host, port, and database name are correct.

Cause

Customer set their logging level to TRACE in the Management Console. Here's what was in their wrapper

INFO   | jvm 1    TRACE [DataSourceManagerServiceImpl] updateConnection dataSourceConnection=DataSourceConnection{id=27676fb4-8144-4979-8e35-4a436d0c9950, name=AS400, options={port=8471, host=10.36.193.191, user=hac\dculjak, password=YXciWNU9Ud53jcjLv+OYdQvyut9Ho6PJ, database=QSYS}, dataSourceDriver=DataSourceDriver{id=1d4f8b4a-b7fd-4df1-81eb-f0a21ed9ee5e, name=xxxx, jdbcDriverClassName=com.ibm.as400.access.AS400JDBCDriver, connectionStringTemplate=jdbc:as400://${host}:${port}/${database} , readOnly=false, parameters=[DataSourceDriverParameter{id=null, name=user, token=dculjak}, DataSourceDriverParameter{id=null, name=password, token=Drazenka5@}]}}
INFO   | jvm 1    | DEBUG [JettyUserRealm] Authenticating admin
INFO   | jvm 1    | DEBUG [BasicAuthenticationInterceptor] Logging in use: admin
INFO   | jvm 1    | TRACE [DataSourceManagerServiceImpl] listConnections
INFO   | jvm 1    | TRACE [DataSourceManagerServiceImpl] listConnections result=[DataSourceConnection{id=27676fb4-8144-4979-8e35-4a436d0c9950, name=AS400, options={port=8471, host=10.36.193.191, user=hac\dculjak, password=STRu04H55cS7JK4vhs9mG1YinjGnJP0T, database=QSYS}, dataSourceDriver=DataSourceDriver{id=1d4f8b4a-b7fd-4df1-81eb-f0a21ed9ee5e, name=HACI, jdbcDriverClassName=com.ibm.as400.access.AS400JDBCDriver, connectionStringTemplate=jdbc:as400://${host}:${port}/${database} , readOnly=false, parameters=[DataSourceDriverParameter{id=2c3b9b63-c795-494b-b4e5-fa15d037eda5, name=user, token=JBlaze, DataSourceDriverParameter{id=cd9779a4-c8fa-4f28-9691-d0dde20af393, name=password, token=Test123}]}}]


The customer set the Property Token for user and password with their UserID and password.

Went to their Management Console > JDBC drivers to modify their connection properties for user and password and confirmed that they did.
 
User-added imageUser-added image

Resolution

UPDATED: April 13, 2017
Ensure to setup the JDBC Connection Properties as follows:
 
User-added imageUser-added image