I found the problem.  The pooled connections are 
using the username/password and turns out it didn't
authorize the db2amin ID (which is what I specified)
to the sample database
(I sure wouldn't have figured that out from the message).

I'm trying to figure out the DB2 userid/password 
system but the documentation is dreadful, the help
sustem broken and the search system next to useless.
Amazing that a major product like this has such bad
documentation.

  -- Frank

> -----Original Message-----
> From: Frank Lawlor [mailto:frank.lawlor@;athensgroup.com] 
> Sent: Wednesday, October 30, 2002 11:23 AM
> To: Jakarta-Commons
> Subject: Connection Pooling problem with DB2
> 
> 
> I downloaded the latest commons connection pooling and seem
> to be having a problem for my DB2 database.
> 
> If I do a simple connection:
> 
>   con = DriverManager.getConnection("jdbc:db2:sample");
> 
> I can use that connection just fine.  However, if I try to 
> use pooling:
> 
>   GenericObjectPool connectionPool = new GenericObjectPool(null);
>   DriverManagerConnectionFactory connectionFactory = 
>     new DriverManagerConnectionFactory("jdbc:db2:sample", 
> username, password);
>   PoolableConnectionFactory poolableConnectionFactory = 
>     new PoolableConnectionFactory(connectionFactory, 
> connectionPool, null, null, false, true);
>   dataSource = new PoolingDataSource(connectionPool);       
>   con = dataSource.getConnection();
> 
> I get the error when I try a SELECT statement:
> 
>   COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0204N  
>     "DB2ADMIN.EMPLOYEE" is an undefined name.  SQLSTATE=42704
> 
> EMPLOYEE is the table in SAMPLE.
> 
> Note that it seems to be trying to go to DB2ADMIN instead of SAMPLE!
> 
> I do not have this problem with SQL server (using the 
> JNetDirect JSQL driver).
> 
> Any idea what the problem is or what I can do to fix this?  
> Is there some 
> particular place in the commons source that is likely to be 
> the problem?
>      
> Thanks,
> 
> Frank Lawlor
> Athens Group, Inc.
> (512) 345-0600 x151
> Athens Group, an employee-owned consulting firm integrating 
> technology strategy and software solutions.
> 
> 
> 


--
To unsubscribe, e-mail:   <mailto:commons-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-user-help@;jakarta.apache.org>

Reply via email to