Scrollable ResultSet Exception "End of Stream" [message #1023638] |
Sun, 24 March 2013 20:17 |
Scott Selvia Messages: 9 Registered: April 2010 |
Junior Member |
|
|
I'm getting a Exception Description: An attempt to read beyond the end of stream occurred. Trying to read a resultset using a scrollable cursor. I could not get the eclipselink example working using my entity:
Query query = em.createQuery("SELECT e FROM Employee e ORDER BY e.lastName ASC, e.firstName ASC");
query.setHint("eclipselink.cursor.scrollable", true);
ScrollableCursor scrollableCursor = (ScrollableCursor)query.getSingleResult();
List<Employee> emps = scrollableCursor.next(10);
Here is my code:
Query query = this.dbConn.createQuery("SELECT o FROM OrderSuppressionRecords o");
query.setHint("eclipselink.cursor.scrollable", true);
ScrollableCursor cursor = (ScrollableCursor)query.getSingleResult();
while (cursor.hasNext() == false)
{
OrderSuppressionRecords record = (OrderSuppressionRecords)cursor.next();
... Other Processing Code
}
Is there a good example that works with EclipseLink 2.3.2?
[Updated on: Sun, 24 March 2013 20:46] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04183 seconds