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

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

4.2.4
4.2.3

Priority

Critical
Configure