File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes JDBC Connection to DB2 on OS/390 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC Connection to DB2 on OS/390" Watch "JDBC Connection to DB2 on OS/390" New topic
Author

JDBC Connection to DB2 on OS/390

Jeffrey Chen
Greenhorn

Joined: Dec 13, 2001
Posts: 4
Hi all, I have a problem to connect to a db2 on os/390 using IBM's DB2Driver. The environment is looking like this:
I have my testing application runing on a NT box, the application is trying to connect to DB2 on os/390 through a middle machine which has DB2 Connect on it. I got the middle machine name XXXX.com and port number 50000 for DB2 Connect on XXXX.com from the administrator. When I tried to connect to the Db2 Connect machine, I got error message "CLI0615E Error receiving from socket, server is not responding". But if I change the port number in the connection string from 50000 to 6789, I got "Attempt to establish connection failed with security reason "15" ("Processing failure"). SQLSTATE=08001". Since I have no experience with DB2 Connect, I am not sure if there is JDBC Applet Server coming with DB2 Connect. Any one has any clue about this? Thanks for your time
Jeffrey Chen
Jeffrey Chen
Greenhorn

Joined: Dec 13, 2001
Posts: 4
I forgot to post the driver info and connection string. Here they are:
Class.forName("COM.ibm.db2.jdbc.net.DB2Driver").newInstance();
The connection string is
String url = "jdbc:db2://servername:50000/DB2T";
I use the net driver instead of app driver since I got "no suitable driver" exception if I use app driver. I don't know why.
Jeffrey Chen
Jeffrey Chen
Greenhorn

Joined: Dec 13, 2001
Posts: 4
After reading more on JavaRanch, I found the following:
If I use IBM's net JDBC driver, I have to have the db2jstrt running on the db2 host machine. My question is now that since where my java application can connect to is the DB2 Connect machine, not the DB2 database machine, should the db2jstrt run on both DB2 Connect and DB2 database machines?
Thanks
Jeffrey Chen
Holm Krieger
Greenhorn

Joined: Feb 17, 2005
Posts: 1
To avoid the "no suitable driver" exception if using the app driver. You have to have the db2 clients installed.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30894
    
158

Holm,
Welcome to JavaRanch! Note that this post is 3 years old.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC Connection to DB2 on OS/390