You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by jc...@chubb.com on 2005/03/11 16:35:13 UTC

doDelete problem, null dbMap

I recently moved over to version 3.1 for Java, I have the selects working
fine now (Thanks). The issue is on a doDelete, the dbMap is null. The error
is occurring on this line:
ColumnMap[] columnMaps = dbMap.getTable(tab).getColumns(); in the doDelete.

My Criteria is setup as follows:
Criteria criteria = new Criteria();
criteria.add(TableNamePeer.PRIMARY_KEY, primaryKey);
TableNamePeer.PRIMARY.doDelete(criteria, dbConn);

This is the main DB2 table and there are many beneath it. Our system will
automatically handle the cascading of the delete. This worked fine in 3.0.

Thank you in advance!
Jim
                                                                                  
                                                                                  
 Jim Caserta                                                                      
                                                                                  
 Whitehouse Station CCI - PM&M Systems                                            
                                                                                  
 Office: (908) 572-4788                                                           
                                                                                  
 Mail Stop: WHB2S-15                                                              
                                                                                  
 jcaserta@chubb.com                                                               
                                                                                  




---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


RE: doDelete problem, null dbMap

Posted by Thomas Fischer <fi...@seitenbau.net>.



John,

My first guess would be that the Peer class is not loaded by the
classloader before you execute the query. See
http://issues.apache.org/scarab/issues/id/TRQS228
In Torque 3.1.1, the problem should be resolved. Alternatively, you can
force the classloader to load the class before you execute the statement,
e.g. by class.forName();

By the way, what is TableNamePeer.PRIMARY ? Never seen that before; I
normally would use
TableNamePeer.doDelete(criteria, dbConn);

  Thomas

jcaserta@chubb.com schrieb am 11.03.2005 16:35:13:

> I recently moved over to version 3.1 for Java, I have the selects working
> fine now (Thanks). The issue is on a doDelete, the dbMap is null. The
error
> is occurring on this line:
> ColumnMap[] columnMaps = dbMap.getTable(tab).getColumns(); in the
doDelete.
>
> My Criteria is setup as follows:
> Criteria criteria = new Criteria();
> criteria.add(TableNamePeer.PRIMARY_KEY, primaryKey);
> TableNamePeer.PRIMARY.doDelete(criteria, dbConn);
>
> This is the main DB2 table and there are many beneath it. Our system will
> automatically handle the cascading of the delete. This worked fine in
3.0.
>
> Thank you in advance!
> Jim
>

>

>  Jim Caserta

>

>  Whitehouse Station CCI - PM&M Systems

>

>  Office: (908) 572-4788

>

>  Mail Stop: WHB2S-15

>

>  jcaserta@chubb.com

>

>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org