IBM Support

SQLCODE-805 attempting to establish a JDBC Connection under CICS

Troubleshooting


Problem

You have a CICS application that receives an SQLCODE -805. This occurs when an application attempts to connect to DB2 using Java Database Connectivity (JDBC™) by invoking the DriverManager.getConnection(url) method.

Symptom

You receive the following message:
can not connect to db2DB2SQLJConnection error in native method:
constructor: ADDCDB2P..DSNJDBC.0000000000000000 DSNJDBC
SQLSTATE=51002 and SQLCODE=-805
com.ibm.db2.jcc.DB2SQLException: DB2SQLJConnection error in native method:
constructor: ADDCDB2P..DSNJDBC.0000000000000000 DSNJDBC

CEDF returns the following when run for the failing transaction:

Cause

The driver was not able to successfully load the JDBC profile.

Resolving The Problem

Add the directory containing the JDBC drivers to the class path of the JVM. For more details, refer to the following sections within the CICS Transaction Server for z/OS (CICS TS) information centers for the releases of CICS you are running:


Also, ensure that the DB2 system property Ddb2sqljjdbcprogram is not set to anything other than DSNJDBC in the system properties file. If not specified, it will default to DSNJDBC.

[{"Product":{"code":"SSGMGV","label":"CICS Transaction Server"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Java","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"4.1;4.2","Edition":"","Line of Business":{"code":"LOB70","label":"Z TPS"}}]

Product Synonym

CICS/TS CICS TS CICS Transaction Server

Document Information

Modified date:
05 January 2026

UID

swg21154093