I finally tracked down that my Torque classes all have "default"
hard-coded into them, as in
dbMap = Torque.getDatabaseMap("default");
so that the only database map that is properly initialized is "default",
which has picked up the database map entries for both my databases. I'm
guessing this is a configuration error on my part. Now I just have to
figure out how to configure it properly...
Gary
[2003-10-29 20:26 -0700] Gary Shea ([EMAIL PROTECTED]) wrote:
> I'm trying to track down a problem. I've been using Torque naively but
> successfully for the last couple of months, but my first attempt to get
> a little fancy has not been successful.
>
> I'm trying to do an update using doUpdate(Criteria,Criteria,Connection)
> and running into a NPE at the line:
> ColumnMap[] columnMaps = tempDbMap.getTable(tab).getColumns();
>
> The application is using two databases ("rc4" and "summary"); at the
> point of the NPE I have already successfully SELECTed from both and INSERTed
> into "summary". I tried the following test code (basically the
> beginning of doUpdate()):
>
> DB db = Torque.getDB(poolName);
> DatabaseMap dbMap = Torque.getDatabaseMap(selectCriteria.getDbName());
> _logger.debug("DB: " + db + " DatabaseMap: " + dbMap);
>
> String dbMapName = dbMap.getName();
> _logger.debug("dbMapName: " + dbMapName);
>
> TableMap[] tableMaps = dbMap.getTables();
> for (int i = 0; i < tableMaps.length; ++i) {
> _logger.debug(i + ": " + tableMaps[i].getName());
> }
> TableMap tableMap = dbMap.getTable(poolTable);
> _logger.debug("table name: " + poolTable + " tableMap: " + tableMap);
>
> For poolName set to either "rc4" or "summary", the only tableMap found
> is for ID_TABLE. Likewise, in both cases dbMap.getTable(poolTable)
> returns null, hence the NPE in the Torque code.
>
> Any hints?
>
> Regards,
>
> Gary
>
> ---------------------------------------------------------------------
> 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]