EHC ❯ ConcurrentModificationException when sending notification
-
Bug
-
Status: Closed
-
-
Resolution: Fixed
-
-
-
drb
-
Reporter: sourceforgetracker
-
September 21, 2009
-
0
-
Watchers: 0
-
September 22, 2009
-
September 22, 2009
Description
I use JGroups to cluster EHCache, with invalidation instead of replication, and sometimes the following error is thrown from the JGroupsReplicator (version 1.2):
2009-04-29 22:25:52,194 ERROR [org.jgroups.blocks.NotificationBus] error sending notification java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793) at java.util.HashMap$KeyIterator.next(HashMap.java:828) at java.util.HashSet.writeObject(HashSet.java:267) at sun.reflect.GeneratedMethodAccessor1125.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at java.util.ArrayList.writeObject(ArrayList.java:570) at sun.reflect.GeneratedMethodAccessor906.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at org.jgroups.util.Util.objectToByteBuffer(Util.java:341) at org.jgroups.blocks.NotificationBus.sendNotification(NotificationBus.java:152) at org.jgroups.blocks.NotificationBus.sendNotification(NotificationBus.java:140) at net.sf.ehcache.distribution.jgroups.JGroupManager.send(JGroupManager.java:245) at net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicator.flushReplicationQueue(JGroupsCacheReplicator.java:417) at net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicator.replicationThreadMain(JGroupsCacheReplicator.java:375) at net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicator.access$000(JGroupsCacheReplicator.java:46) at net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicator$ReplicationThread.run(JGroupsCacheReplicator.java:354)
Sourceforge Ticket ID: 2784207 - Opened By: deadoggelito - 30 Apr 2009 08:20 UTC
Comments
Sourceforge Tracker 2009-09-21
Fiona OShea 2009-09-22
Re-opening so that I can properly close out these issues and have correct Resolution status in Jira
Hi, you appear to be reporting a JGroups bug.
Can you try ehcache-jgroupsreplication-1.3. The JGroups dep is upgraded to 2.6.8.GA.
Or simply upgrade yourself. I don’t think there are any API changes.
Or change to RMI replication. Comment by: gregluck - 8 May 2009 03:22 UTC