• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WAS 4.0 DB connectivity problem

 
Kannan Keeranam
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Here is a problem on WAS 4.0 Advanced Single Server edition which I downloaded from the IBM website. I face a database connectivity problem with DB2 database when trying to deploy the Trade2 sample application for WAS 4.0. The following is the problem description,
All the softwares(WAS 4.0, DB2 UDB 7.1 and the sample application) are installed in one single server. The JDBC drivers are perfectly ok and I confirmed that by writing one small code which uses the native JDBC driver (COM.db2.jdbc.app.DB2Driver) .
The following are the common parameters for any application which is hosted in webphere 4.0 with DB2 as the backend. I strongly suspect these as the main reasons for this error.U can see these parameters by expanding Resources->JDBC Drivers and clicking DB2JdbcDriver in the websphere admin interface.(localhost:9090/admin)

1. Server Class Path:
----------------------------
This is to specify the path to JAR files containing the driver classes. This is the parameter which does'nt get set by default when u install websphere and needs to be supplied. The database config steps (machine name/WSsamples/index.html) given for the Trade2 application says, the server path should be that location where the 'db2java.zip' resides in the system. The serach results for this db2java.zip file results 2 paths where we can find this file. The paths are {Drive}:\sqllib\java\ and {Drive}:\sqllib\cc\c2. I tried giving both these paths. I even tried unzipping that db2java.zip file and gave that path also.
2. Name:
-----------
This is the name of the resource provider. The default value here is DB2JdbcDriver
3. Description:
------------------
This should not matter. Anyways, the default description is DB2 JDBC Driver

4. Implementation Classname:
------------------------------------------
This is the java class name of the JDBC driver implementation. The default value set here is COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource
I have seen sample codes which normally uses COM.db2.jdbc.app.DB2Driver. I tried giving this value also, but, did not get the benefit out of it.
I cannot attach the error log files with this mail, which, gets generated during this error I think. I can do that and send it directly to the individual email id if someone will be able to get some clue from that file. It will be great if I can get a solution for this.
Thank you.
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kannan Keeranam:
Hi,
Here is a problem on WAS 4.0 Advanced Single Server edition which I downloaded from the IBM website. I face a database connectivity problem with DB2 database when trying to deploy the Trade2 sample application for WAS 4.0. The following is the problem description,
All the softwares(WAS 4.0, DB2 UDB 7.1 and the sample application) are installed in one single server. The JDBC drivers are perfectly ok and I confirmed that by writing one small code which uses the native JDBC driver (COM.db2.jdbc.app.DB2Driver) .
The following are the common parameters for any application which is hosted in webphere 4.0 with DB2 as the backend. I strongly suspect these as the main reasons for this error.U can see these parameters by expanding Resources->JDBC Drivers and clicking DB2JdbcDriver in the websphere admin interface.(localhost:9090/admin)

1. Server Class Path:


First of all, you want to use the db2java.zip that is in the sqllib/java directory.
My guess is that you're still using the JDBC 1.1 classes (which is the default) and not the JDBC 2.0 classes WebSphere requires. This is a confusing step in DB2 which most people miss. Open a DOS prompt and CD to sqllib/java12. Run the usejdbc2 batch file. (Note you should shut down all DB2 services in the control panel before doing this). Reboot your machine and try again.
Kyle Brown

------------------
Kyle Brown,
Editor of Enterprise Java (tm) Programming with IBM Websphere
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic