• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using scroller having unexpected exception

 
ray frid
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:

39/622
39/622
39/622
39/622

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,
ray.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic