Thought inc.

The Dynamic O/R Mapping Company
     

CocoBase Technical Support Forums
For access to developer site with software download and doc's, please request CocoBase download and password
will be emailed to you. Response to posts will appear when answered by THOUGHT Support team.
NOTE:You must register separately with forum in order to post your questions, please click on register icon below.
Home   Frequently Asked Questions   Search   Edit your profile   Registration is free!  
Email This Page to Someone!
Show a Printable Version
CocoBase Enterprise O/R Forums > CocoBase Bug Reports
selectNext bug?
< Previous Thread     Next Thread >
Author
Thread    Post New Thread     Post A Reply
rickpare
Member

Registered: May 2001
Posts: 23

I'm trying to use selectBatch and selectNext in a query manager that I am developing. When I call selectNext, I get a StackOverflowError.

Code Example:
foundVector = dataSource.selectBlock(state,
"aces.dataAccess.queries.cashIssuance.CashIssuance",
blockSize);
foundVector = dataSource.selectNext(foundVector, state,
"aces.dataAccess.queries.cashIssuance.CashIssuance");

foundVector: A vector for the results of the query
dataSource: An instance of CocoDriverInterface that has an open database connection.
state: A state object that implements CBProp
blockSize: 1000

The selectNext() method causes:
java.lang.StackOverflowError
at thought.CocoBase.CocoPowder.selectNext(CocoPowder.java, Compiled Code)
at thought.CocoBase.CocoPowderPlugin20.selectNext(CocoPowderPlugin20.java, Compiled Code)
at thought.CocoBase.CocoPowder.selectNext(CocoPowder.java, Compiled Code)
at thought.CocoBase.CocoPowderPlugin20.selectNext(CocoPowderPlugin20.java, Compiled Code)
at thought.CocoBase.CocoPowder.selectNext(CocoPowder.java, Compiled Code)
at thought.CocoBase.CocoPowderPlugin20.selectNext(CocoPowderPlugin20.java, Compiled Code)
.
.
.
at thought.CocoBase.CocoPowder.selectNext(CocoPowder.java, Compiled Code)
at thought.CocoBase.CocoPowderPlugin20.selectNext(CocoPowderPlugin20.java, Compiled Code)
at thought.CocoBase.CocoPowder.selectNext(CocoPowder.java, Compiled Code)
at thought.CocoBase.CocoPowderPlugin20.selectNext(CocoPowderPlugin20.java, Compiled Code)
at thought.CocoBase.CocoPowder.selectNext(CocoPowder.java, Compiled Code)
at thought.CocoBase.CocoPowderPlugin20.selectNext(CocoPowderPlugin20.java, Compiled Code)
at aces.dataAccess.queries.cashIssuanceBatch.CashIssuanceQuery.findByState(CashIssuanceQuery.java, Compiled Code)
at aces.dataAccess.queries.cashIssuanceBatch.CashIssuanceTest.main(CashIssuanceTest.java, Compiled Code)

Any ideas?

08-16-2001 07:34 AM
Click Here to See the Profile for rickpare    Find more posts by rickpare        Edit/Delete Message    Reply w/Quote    IP: Logged
admin
Administrator

Registered: Apr 2001
Posts: 19

Wow,

This sounds like an out of memory or some such error.

Without having the program involved in this it would be
difficult to determine if that's the problem.

You might also consider enabling debug on the runtime and
disabling the JIT so you can get some valid line numbers in
the backtrace. That might help you to debug this better.

The debug option in the runtime is initiated through a call
such as:
cocoDataSource.setDebug(true)

Hope that helps!

THOUGHT Support

08-16-2001 06:15 PM
Click Here to See the Profile for admin    Find more posts by admin        Edit/Delete Message    Reply w/Quote    IP: Logged
rickpare
Member

Registered: May 2001
Posts: 23

I've created a very simple test client that recreates this problem. You should be able to perform the same test using any simple state class.

Debug does not display anything for the selectNext call. Looking at the stack trace, it appears that there is an infinite loop between CocoPowder.selectNext() and CocoPowderPlugin20.selectNext().

Here is my test client. I could email this to you if you prefer.

package aces.selectNextTest;

import java.util.Enumeration;
import java.util.Vector;
import thought.CocoBase.CocoDriver;
import thought.CocoBase.CocoDriverInterface;

/**
* Test Client for demonstrating a bug in selectNext.
*
* @author ***************
*/

public class TestClient extends Object {

/**
* Constructor
*/
public TestClient() {
}

/**
* main
* @param args
*/
public static void main(String[] args) {

String mapname = "aces.selectNextTest.SelectNextTest";
int blockSize = 10;
Vector results;
CocoDriverInterface dataSource = null;

try {

// get a connection
dataSource = CocoDriver.getCocoDriver(
"thought.CocoBase.CocoPowderPlugin20",
"oracle.jdbc.driver.OracleDriver",
"jdbc:oracle:thin:@NNN.NNN.NNN.NNN:1521:MYINSTANCE"
+ ";cocoprop=primarykey.lookup=false,dynamic.querying=true",
"***", "***");
dataSource.setDebug(false);
dataSource.connect();

// instantiate a state class to set query parameters
// (just get all records for this test)
SelectNextTest state = new SelectNextTest();

// perform initial query
results = dataSource.selectBlock(state, mapname, blockSize);
display(results);

// perform selectNext
dataSource.setDebug(true);
results = dataSource.selectNext(results, state, mapname);
display(results);

} finally {
// close connection
if(dataSource != null) {
dataSource.close();
}
}

}

/**
* quick & dirty method for displaying returned data
*/
private static void display(Vector results) {
Enumeration resultsEnum = results.elements();
while(resultsEnum.hasMoreElements()) {
System.out.println(resultsEnum.nextElement());
}
}

}

08-17-2001 07:48 AM
Click Here to See the Profile for rickpare    Find more posts by rickpare        Edit/Delete Message    Reply w/Quote    IP: Logged
admin
Administrator

Registered: Apr 2001
Posts: 19

Thanks for the test.

We'll have someone take a closer look at this and get back to you. Your code looks great, so we're suspicious as to what
might be causing it...

THOUGHT Support

08-17-2001 07:00 PM
Click Here to See the Profile for admin    Find more posts by admin        Edit/Delete Message    Reply w/Quote    IP: Logged
rickpare
Member

Registered: May 2001
Posts: 23

Do you have any estimate on when I can expect to hear back on this?

08-21-2001 09:47 AM
Click Here to See the Profile for rickpare    Find more posts by rickpare        Edit/Delete Message    Reply w/Quote    IP: Logged
admin
Administrator

Registered: Apr 2001
Posts: 19

It's on the hot queue, it should be in the next day or so...

THOUGHT Support

08-21-2001 11:43 AM
Click Here to See the Profile for admin    Find more posts by admin        Edit/Delete Message    Reply w/Quote    IP: Logged
rickpare
Member

Registered: May 2001
Posts: 23

It's been a few more days. Just wondering what the status of this issue is.

08-27-2001 01:14 PM
Click Here to See the Profile for rickpare    Find more posts by rickpare        Edit/Delete Message    Reply w/Quote    IP: Logged
admin
Administrator

Registered: Apr 2001
Posts: 19

We tested this locally and haven't been able to reproduce it
yet. Our selectNext tests work perfectly.

Can you email the support all of the java classes you used and
export your map(s) as XML and send the DDL used to create the
test and populate the database tables. That might give us
a better chance of reproducing this...

THOUGHT Support

08-27-2001 01:24 PM
Click Here to See the Profile for admin    Find more posts by admin        Edit/Delete Message    Reply w/Quote    IP: Logged
All times are PST (US)    Post New Thread     Post A Reply
Forum Jump:
< Previous Thread     Next Thread >

Forum Rules:
Who Can Read The Forum? Any registered user or guest.
Who Can Post New Topics? Any registered user.
Who Can Post Replies? Any registered user.
Changes: Messages can be edited by their author. Messages can be deleted by their author.
Posts: HTML code is OFF. Smilies are OFF. vB code is OFF. [IMG] code is OFF.

Admin Options:
Open / Close Thread
Move Thread
Delete Thread
Edit Thread

< Contact Us - THOUGHT Inc. >

Copyright © Jelsoft Enterprises Limited 2000.
Copyright 2001 All Rights Reserved, THOUGHT Inc.