Hi,

During the registration of a set of nodetypes I encountered this
exception:

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
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.notifyRegistered(No
deTypeRegistry.java:1750)
        at
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.registerNodeTypes(N
odeTypeRegistry.java:223)

It seems that the copying of the listeners triggered this exception:

    private void notifyRegistered(QName ntName) {
        // copy listeners to array to avoid
ConcurrentModificationException
        NodeTypeRegistryListener[] la =
                new NodeTypeRegistryListener[listeners.size()];
        Iterator iter = listeners.values().iterator();
        int cnt = 0;
1750:   while (iter.hasNext()) {
            la[cnt++] = (NodeTypeRegistryListener) iter.next();
        }
        for (int i = 0; i < la.length; i++) {
            if (la[i] != null) {
                la[i].nodeTypeRegistered(ntName);
            }
        }
    }

It seems that the methods "notifyReRegistered" and "notifyUnregistered"
will suffer from the same problem.

Is this a known issue, and can it be solved?

Thanks

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/ 

Reply via email to