Uploaded image for project: 'Hibernate ORM'
  1. HHH-8441

Hibernate is trying to add values to an Immutable List

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 4.2.3, 4.2.4
    • Fix Version/s: 4.3.0.Beta4, 4.2.5
    • Component/s: hibernate-core
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      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

      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.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: