467,209 Members | 1,370 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,209 developers. It's quick & easy.

Troubles using DB2, Websphere 3.5 and Java

Hello partners.
I have some troubles trying to connect to a remote database from a Java Class.

I`m using the following code:

Expand|Select|Wrap|Line Numbers
  1. String DRIVER = "COM.ibm.db2.jdbc.app.DB2Driver";
  3. String URL = "jdbc:db2://";
  5.    try
  6.    {
  7.       Class.forName(DRIVER);
  8.        }
  10.    catch(Exception ex)
  11.    {
  12.       System.out.println("Error");
  13.    }
  14. //more code
  15. .
  16. .
  17.      Connection con = DriverManager.getConnection(URL,"dbjj","dbjjk002");
  19. //more code
The problem is that the program can find the driver, but in the moment that tries to find the DB, I got a SQL exception: "No suitable Driver"

The driver used is DB2Java.zip. I tried with db2jcc.jar and the license driver and it worked perfectly in my local host and local server, but I found that those drivers are not compatible with the JDK 1.2, used by the Websphere 3.5, and I got the horrible "Major minor exception". The big deal is that I need to make it work on that old Websphere.

The weird thing that I found is that when I try to contact the Database using Eclipse or my DB2 Client, I can do it without any problems, using the same IP, Port and DataBase name.

I hope I explain myself well. If any of you have some suggests or solutions, are well received. Or if you have an old DB2 driver for jdk 1.2, you will save my life.

Thank you all.
Jun 22 '07 #1
  • viewed: 1084

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by atlantis@centrum.sk | last post: by
1 post views Thread by Atul Agarwal | last post: by
2 posts views Thread by PM \(pm3iinc-nospam\) | last post: by
3 posts views Thread by s.satoko@gmail.com | last post: by
reply views Thread by luckystarduke | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.