Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

WAS 4.0 DB connectivity problem

 
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.
 
author
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
 
If you send is by car it's a shipment, but if by ship it's cargo. This tiny ad told me:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic