IBM Support

DB2 JCC Driver error: Unexpected Throwable caught: null. ERRORCODE=-4228, SQLSTATE=null

Troubleshooting


Problem

With ORACLE Java, using AES encyption mechanism with property securityMechanism in an application using IBM DB2 JDBC (JCC) driver, the connection fails with: com.ibm.db2.jcc.am.SqlException: [jcc][t4][10262][11223][3.64.106] Unexpected Throwable caught: null. ERRORCODE=-4228, SQLSTATE=null at com.ibm.db2.jcc.am.bd.a(bd.java:663) at com.ibm.db2.jcc.am.bd.a(bd.java:60) at com.ibm.db2.jcc.am.bd.a(bd.java:85) at com.ibm.db2.jcc.t4.b.b(b.java:901) at com.ibm.db2.jcc.t4.b.a(b.java:760) at com.ibm.db2.jcc.t4.b.a(b.java:421) at com.ibm.db2.jcc.t4.b.a(b.java:396) at com.ibm.db2.jcc.t4.b.(b.java:334) at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:232) at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:198) at Jcctest.main(Jcctest.java:33)

Cause

When you use AES encryption with the SDK for Java from Oracle, the JCE(Java Cryptography Extension) Unlimited Strength Jurisdiction Policy File needs to be installed. This error occurs if incompatible JCE file is placed in <Java_home>/jre/lib/security

Diagnosing The Problem

Check the Java version:

Example:

[jcc] Java installation directory = C:\Program Files (x86)\Java\jre7
[jcc] Java Virtual Machine specification version = 1.7
[jcc] Java Virtual Machine specification vendor = Oracle Corporation

Resolving The Problem

Use the JCE file for the correct version of Java.

For example, JCE file for Java 1.7 can be downloaded from here: http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html

Internal Use Only

This technote was generated by Technote Kickstart 1.1.0.68 based on Information Management PMR 09303,122,000.
View the associated PMR's text via Wellspring at: http://eclient.lenexa.ibm.com:9082/DocFetcher/source/PMR/09303.122.000%20O14/07/22

[{"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Business Unit":{"code":"BU001","label":"Analytics Private Cloud"},"Component":"DB2 Tools - Troubleshooting","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.7;9.5;10.1;10.5","Edition":""}]

Document Information

Modified date:
16 June 2018

UID

swg21682878