ERRORCODE=-4499 means that the application server rejected the
establishment of the connection.
Problem and symptom
java.sql.SQLException: [jcc][t4][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.
"jdbc:db2://<server name>: <portnumber>/<database name>";
- 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.
SELECT CURRENT SERVER FROM SYSIBM.SYSDUMMY1;
db2 list dcs directory