IBM Support

A solution to the "can't load db2jcct2 library" error that is thrown by the DB2 Content Manager V8.4 API

Troubleshooting


Problem

DB2® Content Manager V8.4 uses a new JCC driver to connect to DB2 server. A dynamic library (db2jcct2.dll on Windows® or libdb2jcct2.so on UNIX®) is required when DB2 Content Manager V8.4 is configured to use JDBC Type 2. If the API cannot find this library, it throws the following exception: DGL0394A: Error in::DriverManager.getConnection; [jcc][10389][12245][3.50.152] Failure in loading native library db2jcct2

Symptom

DB2 Content Manager V8.4 or the API cannot connect to DB2 Content Manager Library Server Database (LSDB) due to the problem described above.

Resolving The Problem

You can try the solution listed below to solve the problem.

On Windows®:
Add the path that includes the db2jcct2.dll file to the PATH variable. By default, the db2jcct2.dll file is located in %DB2HOME%\bin.

On UNIX:
DB2 Content Manager V8.4 and its APIs load libdb2jcct2.so from DB2 instance library path defined in LD_LIBRARY_PATH or LIBPATH variable.

32-bit DB2 Instance:
Make sure that the DB2 instance library path exists in LD_LIBRARY_PATH (Solaris® or Linux) or LIBPATH (AIX®). For example:

  • For Solaris: export LD_LIBRARY_PATH=/export/home/db2inst1/sqllib/lib:$LD_LIBRARY_PATH 
  • For Linux: export LD_LIBRARY_PATH=/home/db2inst1/sqllib/lib:$LD_LIBRARY_PATH
  • For AIX: export LIBPATH=/home/db2inst1/sqllib/lib:$LIBPATH

64-bit DB2 Instance:
For 64-bit DB2 instance, [DB2 Instance Dir]/sqllib/lib links to 64-bit library directory. The following is the link relationship of the DB2 library directory on UNIX:
[DB2 Instance Dir]/sqllib/lib -> [DB2 Instance Dir]/sqllib/lib64 -> [DB2 Product Installation Dir]/lib64
[DB2 Instance Dir]/sqllib/lib32 -> [DB2 Product Installation Dir]/lib32

But DB2 Content Manager V8.4 supports only the 32-bit libdb2jcct2.so. To make DB2 Content Manager V8.4 and its APIs work correctly, the path to 32-bit libraries must be listed before the path to the 64-bit libraries in LD_LIBRARY_PATH or LIBPATH.
For example:
  • For AIX®: export LIBPATH=/opt/IBM/db2/V9.1/lib32:$LIBPATH

[{"Product":{"code":"SSRS7Z","label":"IBM Content Manager Enterprise Edition"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Usage","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8.4","Edition":"Enterprise","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 June 2018

UID

swg21287078