Hi, The second scenario that I sketched in my previous message is possible: I now can reproduce that values of an ItemStateReferenceMap are evicted by garbage collection during the iteration over that map in the LocalItemStateManager.dispose method (with Jackrabbit 1.2.1). On my local system, however, I did not get the ConcurrentModification exception (Java 5 doc says that it is thrown on a best-effort basis). Anyway, it seems like this is a possible cause of it.
Regards, Martijn On 3/16/07, Martijn Hendriks <[EMAIL PROTECTED]> wrote:
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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] > > > > Wijchenseweg 111 > > 6538 SW Nijmegen > > http://www.gx.nl/ > > > >