jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Pfister (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (JCR-1601) Occasional NullPointerException in ItemManager
Date Wed, 14 May 2008 13:43:58 GMT

     [ https://issues.apache.org/jira/browse/JCR-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Dominique Pfister resolved JCR-1601.

    Resolution: Fixed

While running the test indicated, some other thread apparently invalidates a cached *data*
instance that has just been returned to thread *Thread-11*, i.e. it sets the *state* field
to null. Checking permissions for a cached instance before returning it is a new behaviour,
which explains why this error did not occur before.

Fixed by checking the state of the cached data instance before checking permissions. In the
long run, moving this check into ItemData.getState() might be a better alternative.

> Occasional NullPointerException in ItemManager
> ----------------------------------------------
>                 Key: JCR-1601
>                 URL: https://issues.apache.org/jira/browse/JCR-1601
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: Marcel Reutegger
>            Assignee: Dominique Pfister
>            Priority: Minor
>             Fix For: 1.5
> From time to time I see a NullPointerException in ItemManager when running ConcurrentReadWriteTest.
The exception is probably caused by another session that removes the property, which has the
effect that the ItemState in ItemData is set to null.
> Exception in thread "Thread-11" java.lang.NullPointerException
> 	at org.apache.jackrabbit.core.ItemManager.canRead(ItemManager.java:313)
> 	at org.apache.jackrabbit.core.ItemManager.getItemData(ItemManager.java:293)
> 	at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:226)
> 	at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:486)
> 	at org.apache.jackrabbit.core.LazyItemIterator.prefetchNext(LazyItemIterator.java:111)
> 	at org.apache.jackrabbit.core.LazyItemIterator.<init>(LazyItemIterator.java:93)
> 	at org.apache.jackrabbit.core.LazyItemIterator.<init>(LazyItemIterator.java:75)
> 	at org.apache.jackrabbit.core.ItemManager.getChildProperties(ItemManager.java:658)
> 	at org.apache.jackrabbit.core.NodeImpl.getProperties(NodeImpl.java:2663)
> 	at org.apache.jackrabbit.core.ConcurrentReadWriteTest$1$1.execute(ConcurrentReadWriteTest.java:65)
> 	at org.apache.jackrabbit.core.AbstractConcurrencyTest$Executor.run(AbstractConcurrencyTest.java:206)
> 	at java.lang.Thread.run(Thread.java:595)
> This issue does not occur in a release but only in trunk.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message