[hibernate-issues] [Hibernate-JIRA] Created: (HHH-7299) Cannot scroll ScrollableResults outside of a transaction

Ittay Dror (JIRA) noreply at atlassian.com
Thu May 3 03:36:48 EDT 2012


Cannot scroll ScrollableResults outside of a transaction
--------------------------------------------------------

                 Key: HHH-7299
                 URL: https://hibernate.onjira.com/browse/HHH-7299
             Project: Hibernate ORM
          Issue Type: Bug
          Components: core
    Affects Versions: 4.1.2
            Reporter: Ittay Dror


I have a repository class who is transactional but used by other classes that are not. One of its methods returns a ScrollableResults object. In 3.6.9 I was able to work with it (outside of the transaction), but in 4.1.2 I get an exception. Why should scrolling a query require a transaction?

org.hibernate.HibernateException: proxy handle is no longer valid
	at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.errorIfInvalid(AbstractProxyHandler.java:63) ~[hibernate-core-4.1.2.jar:4.1.2]
	at org.hibernate.engine.jdbc.internal.proxy.AbstractResultSetProxyHandler.continueInvocation(AbstractResultSetProxyHandler.java:84) ~[hibernate-core-4.1.2.jar:4.1.2]
	at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81) ~[hibernate-core-4.1.2.jar:4.1.2]
	at $Proxy99.next(Unknown Source) ~[na:na]
	at org.hibernate.internal.ScrollableResultsImpl.next(ScrollableResultsImpl.java:116) ~[hibernate-core-4.1.2.jar:4.1.2]
	at com.alu.dal.util.HibernateScrollableIterator.advance(HibernateScrollableIterator.java:64) ~[classes/:na]
	at com.alu.dal.util.HibernateScrollableIterator.hasNext(HibernateScrollableIterator.java:41) ~[classes/:na]

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list