We're updating the issue view to help you get more done. 

Hibernate is trying to add values to an Immutable List

Description

1 2 3 4 5 6 7 8 9 10 11 12 13 14 java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:148) at java.util.AbstractList.add(AbstractList.java:108) at org.hibernate.loader.Loader.shouldUseFollowOnLocking(Loader.java:263) at org.hibernate.loader.hql.QueryLoader.applyLocks(QueryLoader.java:332) at org.hibernate.loader.Loader.preprocessSQL(Loader.java:242) at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1833) at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1815) at org.hibernate.loader.Loader.scroll(Loader.java:2592) at org.hibernate.loader.hql.QueryLoader.scroll(QueryLoader.java:552) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.scroll(QueryTranslatorImpl.java:407) at org.hibernate.engine.query.spi.HQLQueryPlan.performScroll(HQLQueryPlan.java:268) at org.hibernate.internal.SessionImpl.scroll(SessionImpl.java:1346) at org.hibernate.internal.QueryImpl.scroll(QueryImpl.java:89)

This happens with the Oracle8i Dialect, scrolling and setting the LockMode.NONE

Without setting the LockMode the code works.

The offending line is:
Loader.java:2592

1 final SqlStatementWrapper wrapper = executeQueryStatement( queryParameters, true, Collections.<AfterLoadAction>emptyList(), session );

Collections.<AfterLoadAction>emptyList() creates an immutable list to which elements are being added later on.

Environment

None

Status

Assignee

Brett Meyer

Reporter

Thomas Hackel

Components

Fix versions

Affects versions

4.2.3
4.2.4

Priority

Critical