db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian K. Wallace" <br...@transmorphix.com>
Subject Re: setDbName
Date Mon, 14 Apr 2003 04:09:34 GMT
To further clarify where I'm getting the exception, I have the following code:

    Criteria crit = new Criteria();
    if (dbName != null) {

[I've also gone the "new Criteria(dbName)" route with 
identical results]

If I perform a doSelect(crit) at this point, it works as 
expected. However, if I add the following line prior to 
executing the doSelect(crit), I always get a 
NullPointerException from the Base:


(Where 'MyPeer.SORT_NUMBER' is valid - and works if the 
criteria is against the 'default' database)

  I haven't gone too far into the code, but this is looking 
more like a bug.

> I'm running an application that deals with more than one 'instance' of a database 
> (identical tables, columns, etc - just different data). I'm trying to use Criteria's

> 'setDbName' to configure the connection to use (as defined in Torque.properties) 
> and I hit a 'null' coming back from BasePeer's createQuery (line 1209) via 
> BasePeer's doSelect (line 1334).  I'm not in the position to know how many 
> databases there will be, but I do know they will all be identical - and can configure
> jdbc connections on the fly, so the ability so setDbName to just point Torque to a 
> different connection is exactly what I need, but I can't seem to get past the 
> BasePeer's NullPointerException.
> Any help would be greatly appreciated.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message