My project needs to access DB2 using JDBC. It runs on different machine (Unix, Solaris) from DB2 (AIX). After unix administrator installed DB2 client software and modified the global profile (adding db2profile there), I can run a stand-alone program to access DB2. However, if I integrate the program into a web application and run it from browser, it can't load jdbc driver. Since our web server dose not have servlet engine, we need using a cgi batch file to wrap the env. varibles. I set all necessary env. varibles in the batch file. It seems web server can not communicate with DB2, or create a DB2 instance. Please help me to fix the problem. Thanks. Fred
Bala Ramachandran
Greenhorn
Joined: Aug 20, 2001
Posts: 12
posted
0
Originally posted by Fred Guo: My project needs to access DB2 using JDBC. It runs on different machine (Unix, Solaris) from DB2 (AIX). After unix administrator installed DB2 client software and modified the global profile (adding db2profile there), I can run a stand-alone program to access DB2. However, if I integrate the program into a web application and run it from browser, it can't load jdbc driver. Since our web server dose not have servlet engine, we need using a cgi batch file to wrap the env. varibles. I set all necessary env. varibles in the batch file. It seems web server can not communicate with DB2, or create a DB2 instance. Please help me to fix the problem. Thanks. Fred
Fred, I am trying to access DB2 UDB in AIX from a sstand-alone Java program in a Sun machine. But I get a SQL exception: COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0616E Error opening socket. SQLSTATE=08S01. Can you help me solve this ? Thanks Bala.
Surya Bahadur
Ranch Hand
Joined: Sep 28, 2000
Posts: 88
posted
0
Hi Have you tried using db2jstrt followed by the port number you specified in the JDBC Url. Surya
Fred Guo
Greenhorn
Joined: Nov 20, 2000
Posts: 4
posted
0
What type jdbc driver is used? if you use net driver, you have to make sure the listener of the DB started, which port it listen to. If you use app driver, you need to install UDB client software on the machine that your program is running. Fred
Bala Ramachandran
Greenhorn
Joined: Aug 20, 2001
Posts: 12
posted
0
Originally posted by Fred Guo: What type jdbc driver is used? if you use net driver, you have to make sure the listener of the DB started, which port it listen to. If you use app driver, you need to install UDB client software on the machine that your program is running. Fred
Hi, I have tried both the 'app' driver as well as the 'net' driver. When I use the 'app' driver, I get the message "No suitable driver found". I have installed the UDB client on the Sun machine (from where I am trying to run the Java program). So I switched to the 'net' driver. I will have to check that the db2jstrt is running on the server in the port '6789'. In that case will my conenction URL also have '6789' as the port number instead of '50000' that I used for 'app' driver ? Thanks Bala.
Bala Ramachandran
Greenhorn
Joined: Aug 20, 2001
Posts: 12
posted
0
Originally posted by Fred Guo: What type jdbc driver is used? if you use net driver, you have to make sure the listener of the DB started, which port it listen to. If you use app driver, you need to install UDB client software on the machine that your program is running. Fred
Hi, When I use the 'app' driver, I get the message "No suitable driver found". I have the UDB client installed on the client machine and have the db2java.zip in the classpath. I downloaded the Sun Solaris version of the UDB client and installed it on the Sun machine. What does this message mean ? Thanks Bala.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.