This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Using scroller having unexpected  exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Using scroller having unexpected  exception" Watch "Using scroller having unexpected  exception" New topic

Using scroller having unexpected exception

ray frid
Ranch Hand

Joined: Dec 23, 2010
Posts: 79
Hi all,

I am using ScrollableResults within streaming mode

For some reason in the while loop I am having an exception:

I know I should have only one select while opening connection when using Scrolling.

But here is the thing: When I am using the scroller I see an additional select in the log files:

I tried again to get the same data without using scroller. then did iteration on all record and watched the log file. I coudlnt see additional selectes beside the big one:

The system.out from the second code (regularNamedQuery) were:


Maybe that will give a hint?

All my data entities in the @ManyToOne are Lazy fetched (@ManyToOne(fetch = FetchType.LAZY))

I also have oneToMany relations in my statement. Maybe that's causing the problem?

Thanks for your help,
I agree. Here's the link:
subject: Using scroller having unexpected exception
jQuery in Action, 3rd edition