Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Connection to DB2 on OS/390

 
Jeffrey Chen
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34672
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Holm,
Welcome to JavaRanch! Note that this post is 3 years old.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic