Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-3339

avoid Oak warning about external events

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • JCR Resource 2.3.0
    • JCR
    • None

    Description

      When running Sling with Oak, the following warning is raised:

      24.01.2014 10:28:44.905 *WARN* [pool-3-thread-1] org.apache.jackrabbit.oak.jcr.observation.ObservationManagerImpl Event listener ///*[11111b] is trying to access user information of event EventImpl{type=1, jcrPath='/OakRepositoryIT1390577324073', userID='admin', identifier='/OakRepositoryIT1390577324073', info={}, date=1390577324092, userData=null, external=false} without checking whether the event is external. java.lang.Exception: The event listener was registered here:
      	at org.apache.jackrabbit.commons.observation.ListenerTracker.<init>(ListenerTracker.java:59)
      	at org.apache.jackrabbit.oak.jcr.observation.ObservationManagerImpl$1.<init>(ObservationManagerImpl.java:113)
      	at org.apache.jackrabbit.oak.jcr.observation.ObservationManagerImpl.addEventListener(ObservationManagerImpl.java:111)
      	at org.apache.sling.jcr.resource.internal.JcrResourceListener.<init>(JcrResourceListener.java:119)
      	at org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory.activate(JcrResourceProviderFactory.java:82)
      

      The reason for which can be found at http://jackrabbit.apache.org/oak/docs/differences.html#Observation

      To avoid this warning, isExternal() should be checked before calling getUserID().

      Attachments

        Issue Links

          Activity

            People

              justinedelson Justin Edelson
              justinedelson Justin Edelson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: