kushwah_a kushwah_a -4 years ago 204
Java Question

Db2 Native Library load error in Java JDBC in CICS?

I am trying to connect to DB2 in an OSGi bundle on jvm server on CICS using type 2 connectivity and I am getting the below error.

com.ibm.db2.jcc.am.SqlException: Failure in loading native library
db2jcct2zos_64, java.lang.UnsatisfiedLinkError: db2jcct2zos_64 (Not
found in java.library.path): ERRORCODE=-4472, SQLSTATE=null

I have referred the directory containing the libdb2jcct2zos.so, ibdb2jcct2zos_64.so, libdb2jcct2zos4.so, libdb2jcct2zos4_64.so files in LIBPATH_SUFFIX in JVM profile of OSGi.

If I try to load these DLLs in java program using System.load("/usr/db2/v10/jdbc/lib/libdb2jcct2zos_64.so"), I get the error of

"EDC5205S DLL module not found".

Answer Source

As referred to in the answer to the question you asked yesterday, there are a number of changes you need to make to use DB2 from an OSGi JVM server:

  • In the CICS job, adding the DB2 datasets to the STEPLIB
  • In the JVM profile, referring to the DB2 libraries in the LIBPATH_SUFFIX attribute
  • In the JVM profile, installing the DB2 bundles via the OSGI_BUNDLES attribute
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download