Release Notes

5Accessing Java shared libraries (Linux)

5To run Java stored procedures or user-defined functions, the Linux run-time 5linker must be able to access certain Java shared libraries, and DB2 UDB must 5be able to load both these libraries and the Java virtual machine. 5Since the program that does this loading runs with setuid privileges, it looks 5for the dependent libraries only in the /usr/lib directory.

5Note:
This topic indicates essential shared libraries that you need to link 5to. Depending on the applications you are building and running, you 5might need to link to additional shared libraries. 5

56Create symbolic links in the /usr/lib directory to point 6to the Java shared libraries.

5For the IBM Developer Kit 1.3, you need symbolic links to 5libjava.so, libjvm.so, and 5libhpi.so. You can create the symbolic links by 5running the following commands as root:

5   cd /usr/lib
5   ln -fs JAVAHOME/jre/bin/libjava.so .
5   ln -fs JAVAHOME/jre/bin/classic/libjvm.so .
5   ln -fs JAVAHOME/jre/bin/libhpi.so .

5where JAVAHOME is the base directory for the SDK. If DB2 5UDB cannot find these libraries, you will get a -4301 error when trying to 5run a Java routine, and there will be messages in the administration 5notification log about libraries not found.

5Note:
6An alternative method is to add the Java shared libraries to the 6/etc/ld.so.conf file instead of creating links in the 6/usr/lib directory. If you do this, you must run the 6ldconfig command as root after changing the 6/etc/ld.so.conf file, otherwise it will not work, as 6the call to the routine will not complete. This alternative method 6might still not work in specific instances, also resulting in the routine not 6completing. If the alternative method does not work, create the links 6in the /usr/lib directory as instructed previously. 6


[ Top of Page | Previous Page | Next Page | Table of Contents ]