-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

See intermixed.

Stephen Peterson wrote:

|Other details, using DB2 Personal Edition version 7.2,
|on Windows 2000 Professional.

don't know about Windows, but I have some observations...

|In the server.xml listing below I added parms for username
|and password since I always see them in other postings, although
|I have always spcified the username/password in the
|getConnection
|method call, successfully in websphere.

If I remember correctly, I tried without username & pass and it don't work.

|    <parameter>
|      <name>url</name>
|      <value>jdbc:db2:gupt1b</value>
|    </parameter>

Do uppercase or lowercase matters in Windows ?

|The following is thrown in the ds.getConnection method:
|
|java.sql.SQLException: Cannot load JDBC driver class
|'com.ibm.db2.jdbc.app.DB2Driver'
|
|Now I did see Fabio Mengue's posting from Feb 20 in a response
|to someone asking a similar question.  I compared his config
|with mine, added at the top of <TOMCAT>/bin/setclasspath.sh
|the line
|set JAVA_OPTS="-Djava.library.path=C:/Program
|Files/sqllib/java/"

Perhaps the right file is setclasspath.bat ?

|and started tomcat with the startup.sh instead of the services
|start in the Computer Management dialog.

As I said, I don't know Windows... How could you call startup.sh ? Do you have startup.bat ?

|The other item:
|----------------
|Add the following line
|Create <TOMCAT>/bin/setenv.sh, as a copy (or a link) of file
|<DB2>/sqllib/db2profile.
|----------------
|I am at a loss, since I cannot find a db2profile file on my PC,
|although I do have the DB2 server software installed as well as
|the
|DB2 client software.

The db2profile file sets some environment varibles, like

DB2DIR
DB2INSTANCE
INSTHOME

And so on. Perhaps these variables are set on autoexec.bat ? Or other script file ?

Couple of things. Maybe you could add "debug=99" to your DefaultContext (is that possible ?) and watch the localhost_log file. When my tomcat starts, I see:

2003-01-06 16:10:43 NamingContextListener[/Standalone/localhost/pool]: Creating JNDI naming context
2003-01-06 16:10:43 NamingContextListener[/Standalone/localhost/pool]: Resource parameters for jdbc/db2 = ResourceParams[name=jdbc/db2, parameters={url=jdbc:db2:DATABASE, driverName=jdbc:db2:DATABASE, maxIdle=0, maxActive=10, maxWait=10000, driverClassName=COM.ibm.db2.jdbc.app.DB2Driver, username=fabio, factory=org.apache.commons.dbcp.BasicDataSourceFactory, password=mypassword}]
2003-01-06 16:10:43 NamingContextListener[/Standalone/localhost/pool]: Adding resource ref jdbc/db2
2003-01-06 16:10:43 NamingContextListener[/Standalone/localhost/pool]: ResourceRef[className=javax.sql.DataSource,factoryClassLocation=null,
factoryClassName=org.apache.naming.factory.ResourceFactory,{type=scope,content=Shareable},
{type=auth,content=Container},{type=url,content=jdbc:db2:DATABASE},
{type=driverName,content=jdbc:db2:DATABASE},{type=maxIdle,content=0},{type=maxActive,content=10},
{type=maxWait,content=10000},{type=driverClassName,content=COM.ibm.db2.jdbc.app.DB2Driver},
{type=username,content=fabio},{type=factory,content=org.apache.commons.dbcp.BasicDataSourceFactory},
{type=password,content=mypassword}]


I'm sorry I can't help you more. All I know is that I fought with DB2 for a long time, and it has to have all things set before you can see the first pooled connection :)

Good luck,

F.

- --
Fabio Mengue - Centro de Computacao - Unicamp
[EMAIL PROTECTED] [EMAIL PROTECTED]
- ----------------------------------------------------------------
When explaining a command, or language feature, or hardware widget, first describe the problem it is designed to solve. David Martin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


iD8DBQE+iyXR9+h2CYv5ecARApPDAKCSMewZKXP/PO+LeN54FFVDByPB0wCfRt5O
8MX+xDMFmgWaJgaE+DdcQPk=
=rleZ
-----END PGP SIGNATURE-----



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to