CRX 2.2: DelegatingObservationDispatcher: Error while dispatching events… java.lang.NullPointerException

Issue

If you are using CQ5.3/CRX2.2 you may notice the following error in the log files:

*ERROR* DelegatingObservationDispatcher: Error while dispatching events. (DelegatingObservationDispatcher.java, line 129)
 java.lang.NullPointerException
  at org.apache.jackrabbit.core.security.authorization.acl.CompiledPermissionsImpl.canRead(CompiledPermissionsImpl.java:215)
  at org.apache.jackrabbit.core.security.DefaultAccessManager.canRead(DefaultAccessManager.java:251)
  at org.apache.jackrabbit.core.observation.EventConsumer.canRead(EventConsumer.java:306)
  at org.apache.jackrabbit.core.observation.EventConsumer.prepareEvents(EventConsumer.java:158)
  at org.apache.jackrabbit.core.observation.ObservationDispatcher.prepareEvents(ObservationDispatcher.java:184)
  at org.apache.jackrabbit.core.observation.EventStateCollection.prepare(EventStateCollection.java:459)
  at org.apache.jackrabbit.core.observation.DelegatingObservationDispatcher.dispatch(DelegatingObservationDispatcher.java:126)
  at org.apache.jackrabbit.core.observation.DelegatingObservationDispatcher.dispatchEvents(DelegatingObservationDispatcher.java:99)
  at org.apache.jackrabbit.core.observation.EventStateCollection.dispatch(EventStateCollection.java:475)
 ...

Reason

This error occurs due to an issue in Jackrabbit issue: https://issues.apache.org/jira/browse/JCR-3272.

It occurs as the canRead() method in CompiledPermissionsImpl.java is checking for read access on an item that does not exist anymore.  It should therefore throw a RepositoryException, instead of resulting in an NPE.

We have had previous reports of this issue, but it did not have any effect on the server state or stability. In the later hotfixpacks for CRX, this NPE will be logged at the WARN level and not ERROR.

Solution

This has been fixed in a later release of the Jackrabbit core, version 2.4.  You can ignore this error or apply the latest crx-hotfixpack from PackageShare to resolve the problem.

reference: (43919/CRX-4113)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 10.0/10 (1 vote cast)
CRX 2.2: DelegatingObservationDispatcher: Error while dispatching events... java.lang.NullPointerException, 10.0 out of 10 based on 1 rating

Comments are closed.