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.
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21244597