Hello Everybody! I am working through the week end.

---------------------------------------------------------------------------------
J2SE 1.4.2_04 + OJB 1.0 rc6 + Struts 1.1 + J2EE (just in classpath)
---------------------------------------------------------------------------------
I am geting a report query by:

broker = PersistenceBrokerFactory.defaultPersistenceBroker();

Criteria crit = new Criteria();
ReportQueryByCriteria q = QueryFactory.newReportQuery(ThreadDto.class, crit);
q.setAttributes(new String[]{"priority", "username"});
Iterator it = broker.getReportQueryIteratorByQuery(q);
while (it.hasNext()){
it.next();......................
.....................
}


but from line: while (it.hasNext()) get the following exception

org.apache.ojb.broker.accesslayer.RsIterator$ResourceClosedException: Resources no longer reachable, RsIterator will be automatic cleaned up on PB.close/.commitTransaction/.abortTransaction
at org.apache.ojb.broker.accesslayer.RsIterator.getRsAndStmt(RsIterator.java:876)
at org.apache.ojb.broker.accesslayer.RsIterator.hasNext(RsIterator.java:228)


I tried to use Query instead of report query, and let it returns a Colleciton, everything is fine.
Later, I still used Query, but ask it return a Iterator (by method: getIteratorByQuery()), I get the same exception as above. It looks like not caused by report query but by Iterator return.


Please give advice,

Thanks!
Wallace


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to