You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2013/04/03 10:31:17 UTC

[jira] [Commented] (OAK-675) Observation generates NPE in sling EventListener

    [ https://issues.apache.org/jira/browse/OAK-675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13620728#comment-13620728 ] 

Jukka Zitting commented on OAK-675:
-----------------------------------

If this turns out to be a problem for also other clients, we could consider returning something like "oak:unknown" or throwing an UnsupportedOperationException from getUserID().
                
> Observation generates NPE in sling EventListener
> ------------------------------------------------
>
>                 Key: OAK-675
>                 URL: https://issues.apache.org/jira/browse/OAK-675
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>            Reporter: Alex Parvulescu
>            Assignee: Alex Parvulescu
>
> Because there is no user id passed on to the events generated by the _ChangeProcessor_, the sling EventListener throws a bunch of NPEs when it receives the events.
> {code}
> 06.03.2013 11:33:13.866 *ERROR* [pool-4-thread-1] org.apache.jackrabbit.oak.plugins.observation.ChangeProcessor Unable to generate or send events java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:394)
> at org.apache.sling.jcr.resource.internal.JcrResourceListener.sendOsgiEvent(JcrResourceListener.java:298)
> at org.apache.sling.jcr.resource.internal.JcrResourceListener.onEvent(JcrResourceListener.java:218)
> at org.apache.jackrabbit.oak.plugins.observation.ChangeProcessor$EventGeneratingNodeStateDiff.sendEvents(ChangeProcessor.java:154)
> at org.apache.jackrabbit.oak.plugins.observation.ChangeProcessor.run(ChangeProcessor.java:117)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira