Message7542

Author luisperlazaro
Recipients luisperlazaro
Date 2012-11-29.08:19:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1354177162.57.0.844004993188.issue1995@psf.upfronthosting.co.za>
In-reply-to
Content
The com.ziclix.python.sql.handler.RowIdHandler class is used to get the rowId of the last insert statement. It relies in the statement object having a method for that:

   try {
       o = c.getMethod(getRowIdMethodName(), (Class[])null);
       ROWIDS.put(c, o);
   } catch (Throwable t) {
       ROWIDS.put(c, CHECKED);
   }
The problem is that when the method doesn't exist, if fails silently (CHECKED is a new Object()).
I almost went mad when trying to use a Django webapp on tomcat 6, which uses commons-dbcp, so it uses a wrapper for the actual database statement, which doesn't have the method to get the row id, so it led to silently returning None to the jython code.

A log statement warning the situation would be helpful.
History
Date User Action Args
2012-11-29 08:19:22luisperlazarosetrecipients: + luisperlazaro
2012-11-29 08:19:22luisperlazarosetmessageid: <1354177162.57.0.844004993188.issue1995@psf.upfronthosting.co.za>
2012-11-29 08:19:22luisperlazarolinkissue1995 messages
2012-11-29 08:19:20luisperlazarocreate