If the server has set DATA_ENCRYPT for authentication in the database manager configuration, the connect always fails. I tried different connecttion strings and get the following errors:
[jcc][t4][4.12.55] Connection authorization failure occurred. Reason: Security mechanism not supported. ERRORCODE=-4214, SQLSTATE=28000
[jcc][4.12.55] Caught java.security.InvalidAlgorithmParameterException while initializing EncryptionManager. See attached Throwable for details. ERRORCODE=-4223, SQLSTATE=null
Everything works fine, if I set authentication to SERVER, but this is not an option. I just set it to SERVER once to narrow down the problem.
I have tried it with several releases of DB2: 9.1, 9.5, and 9.7, but I doubt that it has something to do with DB2.
My current database server runs:
DB21085I Instance "db2inst1" uses "32" bits and DB2 code release "SQL09074"
with level identifier "08050107".
Informational tokens are "DB2 v22.214.171.124", "s110330", "IP23242", and Fix Pack
Product is installed at "/opt/ibm/db2/V9.7".
I'm not a Java person, so I'm really unable to solve this problem myself.