ERRORCODE=-4472

An ERRORCODE=-4472, SQLSTATE=42968, occurs when a Db2® JDBC driver is not licensed for connectivity by the db2jcc_license_cisuz.jar file.

Problem

When trying to connect to a mainframe, the Java™ application fails to connect and shows the following message:
[jcc][t4][10109][10354][4.7.85] The version of the IBM Universal JDBC driver in use is not licensed for connectivity to <Db2_database_name> databases. 
To connect to this server, please obtain a licensed copy of the IBM DB2 Universal Driver for JDBC and SQLJ. 
An appropriate license file db2jcc_license_*.jar for this target platform must be installed to the application class path. 
Connectivity to <Db2_database_name> databases is enabled by any of the following files: [db2jcc_license_cisuz.jar]. 
ERRORCODE=-4472, SQLSTATE=42968

Cause

The JDBC connection checks to see if it is licensed to connect to the server by checking the CLASSPATH environment variable in the db2jcc_license_cisuz.jar file. If the correct license file is not listed in the CLASSPATH, then the error is returned.

Resolution

To resolve the error you must add the appropriate Db2 JDBC license file to the applications CLASSPATH environment variable. If you are connecting to a host (z/OS® or iSeries) then you need to add the db2jcc_license_cisuz.jar file.

The db2jcc_license_cisuz.jar file is included in all Db2 Connect Server editions including Db2 Connect Personal Edition. The license is also part of the IBM® Database Enterprise Developer Edition. If you already have one of these products, then use the license file from the Db2 Connect Activation CD. If you have a Passport Advantage® account, then remember to download the activation key from Passport Advantage for the Db2 Connect edition that you have purchased.

The db2jcc_license_cisuz.jar file is located in the /db2/license directory of the activation CD or activation file downloaded from Passport Advantage.

The license files for Db2 Connect products are not shipped with fix packs. Fix packs only contain a 90 day trial license for Db2 Connect and do not contain the license for the JDBC driver. Only the purchased product delivered on physical media (CD or DVD) or delivered from Passport Advantage contains the JDBC license that allows you to connect to a mainframe.

If you do not have the file, then you must purchase a Db2 Connect product so that you may license the JDBC driver to connect to a mainframe.
Note: If the Java application is being ran as a deployed JAR file, the error can also be encountered if the Class-Path header field in the manifest file, MANIFEST.MF, does not include the path of db2jcc_license_cisuz.jar.