DB2CC on Linux failing to find JDBC
Author |
Message |
Mairhtin O'Feann #1 / 7
|
 DB2CC on Linux failing to find JDBC
I'm having a DEVIL of a time getting DB2CC to start up. I managed to get the script modified enough to actually CALL the Java (not an easy feat - the ln did not accomplish it, no matter WHAT I did), but now when I invoke it, it complains that "[IBM][JDBC lava.lang.UnsatisfiedLinkError : no DB2JDBC (libdb2jdbc.so) in java.library.path" And I have NO IDEA how to fix this. I put java.library.path=/usr/IBMdb2/V7.1/lib/lib/libdb2jdbc.so in the DB2CC script, but no luck. It keeps saying (above line) no such file or directory. Any ideas as to how I can tell the system to look for the JDBC? Mairhtin O'Feannag
since GOOGLE takes forEVER to update)
|
Wed, 04 Aug 2004 10:02:01 GMT |
|
 |
ATT New #2 / 7
|
 DB2CC on Linux failing to find JDBC
You might have already done this, but did you check if you have db2java.zip (JDBC driver for DB2) in your classpath. If not on the environment variable CLASSPATH, at least as a command line argument when you startup db2cc. With db2java.zip you have to be careful about one thing, there are two different files one supporting JDBC1.0 and the other JDBC 2. Those two file will be found in sqllib/java and sqllib/java12 directory. Use the appropriate version of the driver. It depends on which of the two scripts you ran (usejdbc1 or usejdbc2) to setup JDBC support for the server. Good Luck Pat
Quote: > I'm having a DEVIL of a time getting DB2CC to start up. I managed to > get the script modified enough to actually CALL the Java (not an easy > feat - the ln did not accomplish it, no matter WHAT I did), but now > when I invoke it, it complains that "[IBM][JDBC > lava.lang.UnsatisfiedLinkError : no DB2JDBC (libdb2jdbc.so) in > java.library.path" > And I have NO IDEA how to fix this. I put > java.library.path=/usr/IBMdb2/V7.1/lib/lib/libdb2jdbc.so in the DB2CC > script, but no luck. It keeps saying (above line) no such file or > directory. > Any ideas as to how I can tell the system to look for the JDBC? > Mairhtin O'Feannag
> since GOOGLE takes forEVER to update)
|
Fri, 06 Aug 2004 01:05:09 GMT |
|
 |
bb #3 / 7
|
 DB2CC on Linux failing to find JDBC
sounds to like some more minor issues like the jit option in the db2cc script. I would suggest to check out the HOW-TO guide under http://www.linuxdoc.org/HOWTO/DB2-HOWTO/index.html . The section 9.4 goes over the details. bcb
Quote: > You might have already done this, but did you check if you have db2java.zip > (JDBC driver for DB2) in your classpath. If not on the environment variable > CLASSPATH, at least as a command line argument when you startup db2cc. With > db2java.zip you have to be careful about one thing, there are two different > files one supporting JDBC1.0 and the other JDBC 2. Those two file will be > found in sqllib/java and sqllib/java12 directory. Use the appropriate > version of the driver. It depends on which of the two scripts you ran > (usejdbc1 or usejdbc2) to setup JDBC support for the server. > Good Luck > Pat
> > I'm having a DEVIL of a time getting DB2CC to start up. I managed to > > get the script modified enough to actually CALL the Java (not an easy > > feat - the ln did not accomplish it, no matter WHAT I did), but now > > when I invoke it, it complains that "[IBM][JDBC > > lava.lang.UnsatisfiedLinkError : no DB2JDBC (libdb2jdbc.so) in > > java.library.path" > > And I have NO IDEA how to fix this. I put > > java.library.path=/usr/IBMdb2/V7.1/lib/lib/libdb2jdbc.so in the DB2CC > > script, but no luck. It keeps saying (above line) no such file or > > directory. > > Any ideas as to how I can tell the system to look for the JDBC? > > Mairhtin O'Feannag
> > since GOOGLE takes forEVER to update)
|
Fri, 06 Aug 2004 04:15:45 GMT |
|
 |
steph #4 / 7
|
 DB2CC on Linux failing to find JDBC
Hi, We had some problems with DB2CC and Java also. I don't know if this is connected but we found a very helpful hint in Suse's support database (http://www.suse.com). regards, Stephan Quote:
> I'm having a DEVIL of a time getting DB2CC to start up. I managed to > get the script modified enough to actually CALL the Java (not an easy > feat - the ln did not accomplish it, no matter WHAT I did), but now > when I invoke it, it complains that "[IBM][JDBC > lava.lang.UnsatisfiedLinkError : no DB2JDBC (libdb2jdbc.so) in > java.library.path" > And I have NO IDEA how to fix this. I put > java.library.path=/usr/IBMdb2/V7.1/lib/lib/libdb2jdbc.so in the DB2CC > script, but no luck. It keeps saying (above line) no such file or > directory. > Any ideas as to how I can tell the system to look for the JDBC? > Mairhtin O'Feannag
> since GOOGLE takes forEVER to update)
|
Fri, 06 Aug 2004 20:19:37 GMT |
|
 |
Christopher Kelle #5 / 7
|
 DB2CC on Linux failing to find JDBC
Hello, This is rather long, some German, but there are some ideas in there, though SuSe oriented. HowTo as stated helps. Regards, Chris db2cc Problems: 1. Problem with JDK 1.3.0: Check to make sure that the jre is on the system. If it is, then modify the JAVA_HOME environment to point to the path where the jre executable exists. If the jre does not exist in the Java distribution installed on the system, the db2cc script can be modified to reference the "java" executable instead of "jre". .... 2. Problem with Segmentation Error 57 add: unset LANG ######## threads_flag = 'native' LD_Library_path = sqllib/lib Path=sqllib/bin ---- SuSe - SuSe update with sbin/SuSEconfig: has java_threads and create_javalink - 2.4 Kernel - increase msgmni to 128. --- in $Home/sqllib/db2profile - script zur ausfhrung von UDB env.var. -> classpath = sqllib/hava/db2java.zip, sqllib/java/sqlj.zip, sqllib/java/runtime.zip --- in etc: profile und rc.config. check .bashrc und .profile. local profiles in home ---- check that root has /usr/bin in path --- 1.1.8 export JAVA_Home(/usr/jdk118 export PATH=$PATH:$JAVA_HOME/bin export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/classes.zip --- Error message: Library libjava.so not found is received when trying to run Control Center on Linux. The installation of Java Runtime Environment (JRE) 1.1.7 may not have produced appropriate symbolic links in /usr/lib. Confirm JRE installation; the links in /usr/lib/ may be missing. OR Find libjava.so and symbolically link it in /usr/lib. LIBJAVA.SO .. ln -s /usr ....Libjava.so /usr/lib /usr/jdk118/lib/linux/native_thread/libjava.so /usr/jdk118/bin/ .. --- 1.3.0 export PATH=$PATH:/opt/IBMJava2-13/bin in -sf /opt/IBMJava2-13/jre/bin/java /opt/IBMJava2-13/jre/bin/jre Line 44 of /usr/IBMdb2/V7.1/bin/db2cc : moreve -nojit argument. --- in db2cc Then I add the following two lines just above OS=`uname` export JAVA_HOME=/usr/jdk118 export PATH=$JAVA_HOME/bin:$PATH ---- Here some environnement variables that are automaticaly set in install : PATH,CLASSPATH and LD_LIBRARY_PATH : /home/db2inst1/sqllib/bin:/home/db2inst1/sqllib/adm:/home/db2inst1/sqllib/mi sc have to be in PATH. /home/db2inst1/sqllib/java/sqlj.zip:/home/db2inst1/sqllib/function:/home/db2 inst1/sqllib/java/db2java.zip:/home/db2inst1/sqllib/java/runtime.zip have to be in CLASSPATH. /home/db2inst1/sqllib/lib have to be in LD_LIBRARY_PATH and LIBPATH -- Quote: > If i try to start the control center on my Linux box i get: > Unable to initialize threads: cannot find class java/lang/Thread > Could not create Java VM
..... The problem seems that the path to Java Virtual Machine classes can not be resolved. For jdk 1.1.8 the path to the JDK system classes is required (CLASSPATH), however for the jdk 1.3 practice of adding system classes to the class path is absolete . I just wondering what level of jdk you are using ? I was able successfully run control center on the SuSE v 7.2 box, using JDK 1.3 (build cx130-20010626) supplied with the SuSE CD. Below is basic steps I have followed to run Control Center. 1. IBM Development Kit for Java, version 1.3 is part of the SuSE v 7.2 ( also v 7.3) install CD. If you have not intalled it with the OS install, install it by issuing the following command as root: bash# rpm -ivh IBMJava2-SDK-1.3-81.i386.rpm 2. Append the following lines to your /etc/profile file to set up the Java environment for all users: export PATH=$PATH:/usr/lib/java/jre/bin 3. IBM JDK 1.3 does away with the jre command, even if you install the IBM JRE 1.3 package. However, the db2cc script calls the jre command. The easiest solution is to create a link called jre to the java executable in the /usr/lib/java/bin directory by issuing the following command as root. SuSE: bash# ln -sf /usr/lib/java/jre/bin/java /usr/lib/java/jre/bin/jre 4. The db2cc script calls the jre command with the -nojit argument, which is not supported in IBM JDK 1.3. Remove the option by changing line 44 of /sqllib/bin/db2cc to the following: JRE_OPTIONS="-ss256k -mx128m -Ddb2path=$DB2PATH" 5. Before starting Control Center ensure you are logged on to your Linux workstation using either the DB2 Administration Server user ID or the DB2 instance user ID. If you use the su command to become the user, ensure you include the -l parameter to initialize the environment for the user. 6. Start JDBC listener on port and then Issue the db2cc command to start the DB2 Control Center. Depending on the speed of your system, it may take a few seconds for the splash screen to appear, and longer before the full DB2 Control Center appears. Quote:
>> > I'm having a DEVIL of a time getting DB2CC to start up. I managed to >> > get the script modified enough to actually CALL the Java (not an easy >> > feat - the ln did not accomplish it, no matter WHAT I did), but now >> > when I invoke it, it complains that "[IBM][JDBC >> > lava.lang.UnsatisfiedLinkError : no DB2JDBC (libdb2jdbc.so) in >> > java.library.path" >> > And I have NO IDEA how to fix this. I put >> > java.library.path=/usr/IBMdb2/V7.1/lib/lib/libdb2jdbc.so in the DB2CC >> > script, but no luck. It keeps saying (above line) no such file or >> > directory. >> > Any ideas as to how I can tell the system to look for the JDBC? >> > Mairhtin O'Feannag
>> > since GOOGLE takes forEVER to update)
|
Fri, 06 Aug 2004 20:36:42 GMT |
|
 |
Mairhtin O'Feann #6 / 7
|
 DB2CC on Linux failing to find JDBC
Thanks for the attempts at an assist! It turns out that IBM needed to do some cleanup work, which was slipped into FP3 for Linux. (scowl at IBM). Once the fixpacks (3 and then 5) were applied, it was just a matter of editing the DB2CC script, replacing "jre" with "java" (1.3 replaced the jre with a java command, and for some reason, linking the two did NOT resolve the conflict) and then making certain that xhost was run, I *FINALLY* got the CC and Command Centre up and running. Now I just have to test that they actually WORK. :) It's interesting to note that only in the fixpack documentation did it mention that one had to be logged on as the instance owner to be able to start and stop the instance. While this is normal behaviour on other platforms, the way that *NIX is structured, one would think that ROOT had the authority to execute those commands. Silly me kept logging on as ROOT and kept getting his knickers in a twist over permissions. Makes you appreciate a goo SA all the more! Again, to those who attempted an assist, thanks. To those who ignored this : "PHFTHTHTHTTTTTT!" Mairhtin Quote:
> Hi, > We had some problems with DB2CC and Java also. I don't know if this is > connected but we found a very helpful hint in Suse's support database > (http://www.suse.com). > regards, > Stephan
|
Sun, 08 Aug 2004 01:41:16 GMT |
|
 |
Ronald Col #7 / 7
|
 DB2CC on Linux failing to find JDBC
Quote:
> I'm having a DEVIL of a time getting DB2CC to start up. I managed to > get the script modified enough to actually CALL the Java (not an easy > feat - the ln did not accomplish it, no matter WHAT I did), but now > when I invoke it, it complains that "[IBM][JDBC > lava.lang.UnsatisfiedLinkError : no DB2JDBC (libdb2jdbc.so) in > java.library.path"
The "ln" in the Howto is wrong. You need to do this: # cd /opt/IBMJava2-13/bin # ln -s ../jre/bin/java jre And don't forget to make sure "/opt/IBMJava2-13/bin" is in your path! Quote: > And I have NO IDEA how to fix this. I put > java.library.path=/usr/IBMdb2/V7.1/lib/lib/libdb2jdbc.so in the DB2CC > script, but no luck. It keeps saying (above line) no such file or > directory. > Any ideas as to how I can tell the system to look for the JDBC?
The Howto also says you need to edit db2cc and remove the "-nojit" option since IBMJava2-13 doesn't understand it. After I did the above, db2cc came up without any problem for me. -- Forte International, P.O. Box 1412, Ridgecrest, CA 93556-1412
President, CEO Fax: (760) 499-9152 My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084 4A88 8851 E6C8 69E3 B00B
|
Tue, 24 Aug 2004 05:54:18 GMT |
|
|
|