Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337099

Summary: NullPointerException in JoinedAttributeManager class with cursor
Product: z_Archived Reporter: jean marie turc <jmturc>
Component: EclipselinkAssignee: Project Inbox <eclipselink.orm-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: major    
Priority: P2 CC: christopher.delahunt, david.minsky, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description jean marie turc CLA 2011-02-14 05:36:45 EST
Build Identifier: eclipselink version 2.1.2.v20101206-r8635

I try to use a cursor on a large number of data. 
After reading more than 15.000 rows ,  I have a null pointer exception.
More info here :
http://www.eclipse.org/forums/index.php?t=msg&th=204254&start=0&S=f5f7b451ee601f8d5d3a33158b6bce83





Reproducible: Always

Steps to Reproduce:
1.Execute a query with cursor with a large number of rows, the object I read contains a join relation:
Query query = em.createQuery(sql);
query.setHint("eclipselink.cursor.scrollable", true);
ScrollableCursor scrollableCursor = (ScrollableCursor) query.getSingleResult();
boolean loop = true;
while (loop) {
	List<Object> emps = scrollableCursor.next(100);
	if (emps == null || emps.size() == 0)
		loop = false;
	}

2.
3.
Comment 1 Tom Ware CLA 2011-02-24 08:31:37 EST
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Community: Please vote for this bug if it is important to you.  Votes are one of the main criteria we use to determine which bugs to fix next.
Comment 2 David Minsky CLA 2011-10-26 12:27:30 EDT
I've observed the same issue when reproducing the following bug:

Bug 361860 - Using ScrollableCursor with 1:M joining produces incorrect results

I can confirm that when testing the patch attached to this bug, the NPE is no longer observed.
Comment 3 Chris Delahunt CLA 2011-10-27 12:50:48 EDT
The underlying cause is the same - the cursor row is being nulled out when still needed when joining is being used.

*** This bug has been marked as a duplicate of bug 361860 ***
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:08:06 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:14:16 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink