On Friday, July 20, 2001, at 04:40  PM, Jon Stevens wrote:

> on 7/20/01 8:54 AM, "Scott Dietrich" <[EMAIL PROTECTED]> wrote:
>
>> Hi,
>>
>> I've recently been trying to use the LargeSelect class in torque
>> standalone version 2.1 and ran across some problems (and hopefully some
>> fixes).
>>
>> First, I was getting a NullPointerException from LargeSelect's run()
>> method (line 354). It appears as though the results vector is being
>> added to before being initialized. Adding "results = new Vector();" the
>> init() method fixed this.
>>
>> Second, I was getting a "DataSetException: You must call
>> DataSet.clearRecords() before executing DataSet.fetchRecords() again!"
>> from LargeSelect's run() method (line 349). Adding 
>> "qds.clearRecords();"
>> just after line 356 fixed this.
>>
>> I'm not really familiar with turbine code, and not sure if these are 
>> the
>> best fixes, but now LargeSelect appears to be behaving as expected.
>>
>> Scott
>
> It would be great if you would submit a patch for the code!
>
> <http://jakarta.apache.org/site/source.html>
>
> Thanks!
>
> -jon
>
> --

Here's a patch:

--- LargeSelect.java.orig       Tue Jul 17 16:36:05 2001
+++ LargeSelect.java    Fri Jul 20 17:09:40 2001
@@ -203,6 +203,7 @@
      {
          this.memoryLimit = memoryLimit;
          this.name = name;
+        results = new Vector();
          query = BasePeer.createQueryString(criteria);
          dbName = criteria.getDbName();
          blockEnd = blockBegin + memoryLimit - 1;
@@ -353,6 +354,7 @@
                      results.addElement( tempResults.elementAt(i) );
                  }
                  currentlyFilledTo += miniblock;
+                qds.clearRecords();
              }
          }
          catch (Exception e)


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

Reply via email to