ERRORCODE=-4499
ERRORCODE=-4499
means that the application server rejected the
establishment of the connection.
Problem and symptom
You attempt to connect to a database using a Type 4 JCC driver but it fails with the following
exception:
java.sql.SQLException: [jcc][t4][2057][11264][3.53.95] The application server rejected establishment of the connection.
An attempt was made to access a database, which was either not found or does not support transactions. ERRORCODE=-4499, SQLSTATE=08004 DSRA0010E: SQL State = 08004, Error Code = -4,499
Essentially, the connection fails.
Cause and solution
The cause of this error is using a DCS DB alias or a local alias name of the database in the connection string will attempting the connection.
The solution starts with the URL format for IBM Data Server Driver for JDBC and SQLJ type 4
connectivity
is:
"jdbc:db2://<server name>: <portnumber>/<database name>";
In the Type 4 JDBC JCC driver connection string used:
- If the connection is to a Db2® server, the <database name> should be the target database name in the database server, it should not be the local alias name cataloged in the client.
- If the connection is to a Db2 for z/OS® server, <database name> is the Db2 location name that is defined during installation. All characters in the Db2 location name must be upper-case characters. The IBM Data Server Driver for JDBC and SQLJ does not convert lower-case characters in the database value to upper-case for IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.
The location name can be found by executing the following SQL statement on the
server:
SELECT CURRENT SERVER FROM SYSIBM.SYSDUMMY1;
The target database name can also be found from the DCS directory on the
client using the command:
db2 list dcs directory