jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Deadlock in cluster deployment
Date Mon, 03 Aug 2009 09:06:57 GMT
Hi,

I guess this is similar to JCR-2168 but for ItemManager. The following
patch might solve the problem:

Index: src/main/java/org/apache/jackrabbit/core/ItemManager.java
===================================================================
--- src/main/java/org/apache/jackrabbit/core/ItemManager.java	(revision 800265)
+++ src/main/java/org/apache/jackrabbit/core/ItemManager.java	(working copy)
@@ -119,12 +119,12 @@
         this.rootNodeDef = rootNodeDef;
         this.rootNodeId = rootNodeId;

+        // setup shareable nodes cache
+        shareableNodesCache = new ShareableNodesCache();
+
         // setup item cache with weak references to items
         itemCache = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);
         itemStateProvider.addListener(this);
-
-        // setup shareable nodes cache
-        shareableNodesCache = new ShareableNodesCache();
     }

     /**

I've created a jira issue for this:
https://issues.apache.org/jira/browse/JCR-2237

regards
 marcel

On Mon, Aug 3, 2009 at 07:59, aasoj j<aas.ojj@gmail.com> wrote:
> Thanks Marcel,
>
> I downloaded 1.5.7 src and applied the the patch (
> https://issues.apache.org/jira/secure/attachment/12412869/JCR-2171.patch).
> This solves the problem. However now I can see a new NPE. Please see the
> stack trace below.
>
> java.lang.NullPointerException
>        at
> org.apache.jackrabbit.core.ItemManager.retrieveItem(ItemManager.java:743)
>        at
> org.apache.jackrabbit.core.ItemManager.stateCreated(ItemManager.java:927)
>        at
> org.apache.jackrabbit.core.state.StateChangeDispatcher.notifyStateCreated(StateChangeDispatcher.java:96)
>        at
> org.apache.jackrabbit.core.state.SessionItemStateManager.stateCreated(SessionItemStateManager.java:812)
>        at
> org.apache.jackrabbit.core.state.StateChangeDispatcher.notifyStateCreated(StateChangeDispatcher.java:96)
>        at
> org.apache.jackrabbit.core.state.LocalItemStateManager.stateCreated(LocalItemStateManager.java:428)
>        at
> org.apache.jackrabbit.core.state.StateChangeDispatcher.notifyStateCreated(StateChangeDispatcher.java:96)
>        at
> org.apache.jackrabbit.core.state.SharedItemStateManager.stateCreated(SharedItemStateManager.java:390)
>        at
> org.apache.jackrabbit.core.state.StateChangeDispatcher.notifyStateCreated(StateChangeDispatcher.java:96)
>        at
> org.apache.jackrabbit.core.state.SharedItemStateManager.stateCreated(SharedItemStateManager.java:390)
>        at
> org.apache.jackrabbit.core.state.ItemState.notifyStateCreated(ItemState.java:235)
>        at
> org.apache.jackrabbit.core.state.ChangeLog.persisted(ChangeLog.java:310)
>        at
> org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:751)
>        at
> org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:1100)
>        at
> org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:351)
>        at
> org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:326)
>        at
> org.apache.jackrabbit.core.version.AbstractVersionManager$WriteOperation.save(AbstractVersionManager.java:150)
>        at
> org.apache.jackrabbit.core.version.AbstractVersionManager.createVersionHistory(AbstractVersionManager.java:317)
>        at
> org.apache.jackrabbit.core.version.VersionManagerImpl$1.run(VersionManagerImpl.java:220)
>        at
> org.apache.jackrabbit.core.version.VersionManagerImpl$DynamicESCFactory.doSourced(VersionManagerImpl.java:567)
>        at
> org.apache.jackrabbit.core.version.VersionManagerImpl.createVersionHistory(VersionManagerImpl.java:217)
>        at
> org.apache.jackrabbit.core.version.XAVersionManager.createVersionHistory(XAVersionManager.java:156)
>        at
> org.apache.jackrabbit.core.version.AbstractVersionManager.getVersionHistory(AbstractVersionManager.java:234)
>        at
> org.apache.jackrabbit.core.ItemImpl.initVersionHistories(ItemImpl.java:727)
>        at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1080)
>        at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:858)
>
>
> regards
> aasoj
>
> On Thu, Jul 30, 2009 at 3:44 PM, Marcel Reutegger
> <marcel.reutegger@gmx.net>wrote:
>
>> Hi,
>>
>> On Tue, Jul 28, 2009 at 11:30, aasoj j<aas.ojj@gmail.com> wrote:
>> > It seems that these issues are similar to issues below.
>> >
>> >   1.
>> >
>> http://www.nabble.com/-jira--Created%3A-%28JCR-2168%29-Avoid-premature-publication-of-XAItemStateManager-td24145090.html#a24200238
>>
>> this has been fixed in 1.5.7. the release is not yet listed on the
>> download page but you can still download it:
>>
>> http://www.apache.org/dyn/closer.cgi/jackrabbit/1.5.7/source/jackrabbit-1.5.7-src.jar
>>
>> >   2. https://issues.apache.org/jira/browse/JCR-2171
>>
>> that's been fixed as well but is not yet available in a release. as
>> reported by Sébastien Launay patching the 1.5.7 release works. See
>> https://issues.apache.org/jira/secure/attachment/12412869/JCR-2171.patch
>> for the required change.
>>
>> If that's not viable for you then you either have to wait for the 1.6
>> release or request a 1.5.8 release that will include the fix for
>> JCR-2171.
>>
>> regards
>>  marcel
>>
>

Mime
View raw message