db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gao Jun" <gao....@silicomp.com.sg>
Subject org.apache.ojb.broker.accesslayer.RsIterator: absolute(0)
Date Thu, 10 Nov 2005 11:31:05 GMT
Hi guys,

I'm using ojb 1.0.2 with oracle 9.2.


When I use ReportQueryByCriteria with setStartAtIndex and setEndAtIndex,

I found when I set the startAtIndex to 1, an ORA-17068 exception throws at
JDBC level. 

(invalid argument caused by absolute(0))


The startAtIndex of 1 is decreased by 1 at PagingIterator.init() and passed
to RsIterator.absolute(int row), so RsIterator.absolute(0) is called.


After study the ojb source, I have one question regarding the method
RsIterator.absolute(int row) (org.apache.ojb.broker.accesslayer.RsIterator)


this line:

retval = getRsAndStmt().m_rs.absolute(row);


I add a checking to prevent absolute(0) happens (when
query.setStartAtIndex(1)). As below:

if(row != 0) {

      retval = getRsAndStmt().m_rs.absolute(row);




Is my way correct?

Please advice. Thanks,



Gao Jun

View raw message