jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martijn Hendriks" <mhnd...@gmail.com>
Subject Re: ConcurrenModificationException
Date Fri, 16 Mar 2007 16:35:38 GMT
Hi Marcel,

I am a bit reluctant on creating a JIRA issue because I don't know yet
whether we are misusing jackrabbit (1.2.1) or not. I thought of two
possible scenarios that might trigger the exception.

The first scenario is two threads closing the same session. We create
a new session for each thread, however.

The second scenario is more complicated: Suppose that one thread gets
the iterator (for the values of the ItemStateRefereceMap of an
ItemStateReferenceCache) in the LocalItemStateManager.dispose method.
Then another thread triggers the CacheManager.resizeAll method that
effectively evicts items from the MLRUItemStateCache that serves as
the secondary cache of that same ItemStateReferenceCache. Then some
items in the ReferenceMap might be only weakly reachable, and are
evicted. Could this happen? If so, then this might be what's going on.
It would also explain why it is so badly reproducable (at least by
me).

Regards,

Martijn

On 3/16/07, Marcel Reutegger <marcel.reutegger@gmx.net> wrote:
> Hi Martijn,
>
> can you please create a jira issue report and provide relevant information like
> the exact jackrabbit version you are using.
>
> thanks.
>
> regards
>   marcel
>
> Martijn Hendriks wrote:
> > Hi,
> >
> > We regularly get the following exception, and I have currently no idea
> > what can cause this. It might be something in our own application that
> > is built upon Jackrabbit, but I don't know that for sure.
> >
> > java.util.ConcurrentModificationException
> >         at
> > org.apache.commons.collections.map.AbstractReferenceMap$ReferenceEntrySe
> > tIterator.checkMod(AbstractReferenceMap.java:761)
> >         at
> > org.apache.commons.collections.map.AbstractReferenceMap$ReferenceEntrySe
> > tIterator.hasNext(AbstractReferenceMap.java:735)
> >         at
> > java.util.Collections$UnmodifiableCollection$1.hasNext(Collections.java:
> > 1009)
> >         at
> > java.util.Collections$UnmodifiableCollection$1.hasNext(Collections.java:
> > 1009)
> >         at
> > org.apache.jackrabbit.core.state.LocalItemStateManager.dispose(LocalItem
> > StateManager.java:341)
> >         at
> > org.apache.jackrabbit.core.WorkspaceImpl.dispose(WorkspaceImpl.java:170)
> >         at
> > org.apache.jackrabbit.core.SessionImpl.logout(SessionImpl.java:1225)
> >         at
> > org.apache.jackrabbit.core.XASessionImpl.logout(XASessionImpl.java:379)
> >
> > Has anyone seen this before?
> >
> > Regards,
> >
> > Martijn Hendriks
> > <GX> creative online development B.V.
> >
> > t: 024 - 3888 261
> > f: 024 - 3888 621
> > e: martijnh@gx.nl
> >
> > Wijchenseweg 111
> > 6538 SW Nijmegen
> > http://www.gx.nl/
> >
>
>

Mime
View raw message