Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-2168

Avoid premature publication of XAItemStateManager

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.6
    • 1.5.7
    • jackrabbit-core
    • None

    Description

      The XAItemStateManager constructor calls the super constructor (LocalItemStateManager) which registers the instance as a listener with the SharedItemStateManager. The construction of the instance has not yet been finished, but it is accessible from the SharedItemStateManager. This can result in strange exceptions like the following:

      java.lang.NullPointerException
      at org.apache.jackrabbit.core.state.XAItemStateManager.stateModified(XAItemStateManager.java:580)
      at org.apache.jackrabbit.core.state.StateChangeDispatcher.notifyStateModified(StateChangeDispatcher.java:111)
      at org.apache.jackrabbit.core.state.SharedItemStateManager.stateModified(SharedItemStateManager.java:400)
      at org.apache.jackrabbit.core.virtual.AbstractVISProvider.stateModified(AbstractVISProvider.java:445)
      at org.apache.jackrabbit.core.state.ItemState.notifyStateUpdated(ItemState.java:244)

      The NPE is caused by the commitLogs field being null (it has not yet been initialized to its final value).

      Attachments

        1. JCR-2168.patch
          7 kB
          Martijn Hendriks

        Activity

          People

            Unassigned Unassigned
            martijnh Martijn Hendriks
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: