IBM Support

SqlException: Connection authorization failure occurred. Reason: security mechanism not supported

Question & Answer


Question

You might encounter the following error when trying to connect using the DB2 Universal JDBC Driver (Type-4) to a database that is catalogued with an authentication type of SERVER_ENCRYPT: com.ibm.db2.jcc.a.SqlException: Connection authorization failure occurred. Reason: security mechanism not supported.

Cause

This might occur when using a version of the IBM® Java™ development kit (JDK) that does not have 256 key size support.

Diagnosis Details

If you collect JDBC trace data, you will see an exception like this:

[SQLException@9d23845][Throwable@9b03845]java.security.InvalidAlgorithmParameterException


[ibm][db2][jcc][Thread:SoapConnectorThreadPool :                        
7][SQLException@9d23845][Throwable@9b03845] Message = Prime size must be
multiple of 64, and can only range from 512 to 1024 (inclusive)  

Answer

Use a version of the IBM JDK that has 256 key size support. JDK versions 1.4.2 SR1 and above have 256 key size support.

You can run the command java -version to check the JDK version.

[{"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Business Unit":{"code":"BU001","label":"Analytics Private Cloud"},"Component":"Programming Interface - JCC","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"}],"Version":"9.8;9.7;10.1;10.5","Edition":"Advanced Enterprise Server;Enterprise Server;Express;Express-C;Personal;Workgroup Server"}]

Document Information

Modified date:
16 June 2018

UID

swg21244597