0

I made a change to an OSGi JVM Profile by adding a library to LIBPATH_SUFFIX. After that I discarded my JVM server and reinstalled it, but the changes are not getting reflected. Is there a secondary step that I should have taken care of after making the changes to the JVM Profile file?

Ben Cox
  • 1,393
  • 10
  • 28
kushwah_a
  • 135
  • 2
  • 9
  • This is really difficult to debug without any further information. Do you have sections of the JVM profile that you could show us? What version of CICS TS are you working with? This information would help us. – Ben Cox Jan 12 '17 at 12:11
  • Are there any relevant messages in the CSSL TD queue, usually mapped to the MSGUSR DD? Or the JESMSGLG DD? – cschneid Jan 12 '17 at 16:15
  • CICS TS is at 5.2 level. Actually I need to connect to JDBC with type 2 driver, so I have put the db2jcc2.jar and db2jcc_license_cisuz.jar in an separate OSGi bundle and installed it. But when I try to connect to DB using DriverManager.getConnection I get the error **********************Failure in loading native library db2jcct2zos_64, java.lang.UnsatisfiedLinkError: db2jcct2zos_64************* so I tried adding the path in LIBPATH_SUFFIX where I had the .so files (libdb2jcct2zos.so, ibdb2jcct2zos_64.so, libdb2jcct2zos4.so, libdb2jcct2zos4_64.so )..but I get the same error – kushwah_a Jan 13 '17 at 07:08
  • There are no messages in JESMSGLG. I see the logs in the jvm logs. – kushwah_a Jan 13 '17 at 09:38

1 Answers1

0

If you want to add DB2 JDBC type2 driver support to an OSGi JVM server you will need to do the following:

  1. Add the DB2 libraries to the CICS STEPLIB
  2. Create/install a CICS DB2CONN resource and ensure this works

  3. Add the DB2 JDBC driver and license JARs to the JVM server middleware classpath using the OSGI_BUNDLES parameter. Note these JARs are already packaged as OSGi bundles.

  4. Add the DB2 shared libs to the JVM server LIBPATH_SUFFIX
  5. Disable/enable the JVM server to restart it

For reference see

If you need to debug the actual value of the JVM server libpath, the best tool is the IBM Health Center, and the Environment perspective will show the java.library.path in use in a JVM, see this tutorial

  • Thanks Phil for suggestion!! Could you provide another link for the example as the given link seems broken. I have deployed the DB2 driver jars as OSGI bundle because I was getting class not found error before, once I deployed the OSGi bundle containing jars, I started getting the native library error. FYI my cics version is 5.2 and I am able to connect to DB2 using type 4 connectivity. – kushwah_a Jan 13 '17 at 11:42
  • Indeed there was an environment problem and we had to make changes in region's steplib, now that error is not coming.. I am getting the below error. com.ibm.db2.jcc.am.SqlSyntaxErrorException: [jcc][50053][12311][3.69.56] T2zOS exception: [jcc][T2zos]T2zosConnection.flowConnect:execConnect:1425: DB2 engine SQL error, SQLCODE = -922, SQLSTATE = 42505, error tokens = PLAN ACCESS;00F30034 ERRORCODE=-922, SQLSTATE=42505 Using the below java code to connect to DB2 – – kushwah_a Feb 01 '17 at 07:02
  • What do I need to change in my DB2Conn entry to make this PLAN ACCESS error go away or what sort of permissions and configurations are missing from my region? – kushwah_a Feb 03 '17 at 09:46
  • Some of the DB2Conn Properties after doing CEMT i DB2Conn: Authid( ) Authtype( Sign ) and Signid( ABCDCICS ) Plan( DEFAULT ) .. So what should I ask my system adminstrator regarding the access as I dont have access to change the DB2Conn? I am following link and it seems like the ABCDCICS does not have access to access the default plan that's why the java programs are not able to use T2 driver to connect to DB2 , is my understanding correct?planhttps://www.ibm.com/support/knowledgecenter/en/SSEPEK_10.0.0/codes/src/tpc/n922.html – kushwah_a Feb 03 '17 at 10:27