Based on my own experience, the problem should be around your
Torque.properties file (/WEB-INF/conf). Torque now provides 4 different ways
to do DB connection pooling. One of them is Jdbc2Pool, which has some
incompatibilities between DB engines, specifically the testOnBorrow
property, I don't know what DB are you using but DB2 didn't like it the SQL
sentence to test if db connection is still alive before re-cycling it.

What I did and the current TDK does is to switch to Torque's old pool.

In you Torque.props, comment out you Jdbc2Pool settings and use Torque's
settings.

Here is mine:

torque.dsfactory.nfe.factory=org.apache.torque.dsfactory.TorqueDataSourceFac
tory
torque.dsfactory.nfe.pool.defaultMaxConnections=10
torque.dsfactory.nfe.pool.maxExpiryTime=3600
torque.dsfactory.nfe.pool.connectionWaitTimeout=10
torque.dsfactory.nfe.connection.driver = COM.ibm.db2.jdbc.app.DB2Driver
torque.dsfactory.nfe.connection.url = jdbc:db2:nfe
torque.dsfactory.nfe.connection.user = ******
torque.dsfactory.nfe.connection.password = *******

Rogelio

> -----Original Message-----
> From: Rodrigo Reyes [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 19, 2003 12:53 PM
> To: [EMAIL PROTECTED]
> Subject: Migrating to TDK 2.2 causes a dbcp error...
> 
> 
> Hi all,
> 
> We are migrating our app to TDK 2.2 from the 2.1 version. 
> Everything works
> fine now, except the DB connection. We get this error :
> 
> java.lang.NullPointerException
>  at
> org.apache.commons.dbcp.PoolingDataSource.getConnection(Poolin
> gDataSource.ja
> va:110)
> 
> I guess it is a conflict between the libraries in tdk2.2 and 
> those in 2.1.
> Please correct me if you have other idea of what the cause of 
> the error is.
> If it is a problem with the libraries, do you know what jars 
> should I change
> or remove?.
> 
> Thanks,
> 
> Rodrigo.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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

Reply via email to