Re: Error in commons collections4 Caused by java util ConcurrentModificationException

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Error in commons collections4 Caused by java util ConcurrentModificationException

garydgregory
Just like it says on the Javadoc:
https://docs.oracle.com/javase/7/docs/api/java/util/ConcurrentModificationException.html

One piece of code must be reading while another is writing on the
collection.

Gary

On Thu, Dec 28, 2017 at 11:21 AM, durairaj t <[hidden email]> wrote:

> Hi All,
>
> I'm using comm.coll4 with JBOSS EAP sever 7.0 runtime and getting the below
> error,
>
> I don't know whats going on, Any help?
>
>
> Error Message:
> ______________
>
> Caused by: java.util.ConcurrentModificationException
> at org.apache.commons.collections4.map.AbstractLinkedMap$LinkIt
> erator.nextEntry(AbstractLinkedMap.java:552)
> at org.apache.commons.collections4.map.AbstractLinkedMap$LinkMa
> pIterator.next(AbstractLinkedMap.java:357)
> at org.apache.commons.collections4.map.AbstractHashedMap.doWrit
> eObject(AbstractHashedMap.java:1233)
> at org.apache.commons.collections4.map.LinkedMap.writeObject(
> LinkedMap.java:124)
> at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> thodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.marshalling.reflect.SerializableClass.callWriteObj
> ect(SerializableClass.java:271)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> bleObject(RiverMarshaller.java:976)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> verMarshaller.java:854)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(Ri
> verMarshaller.java:1032)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> bleObject(RiverMarshaller.java:988)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> bleObject(RiverMarshaller.java:967)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> bleObject(RiverMarshaller.java:967)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> bleObject(RiverMarshaller.java:967)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> bleObject(RiverMarshaller.java:967)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> bleObject(RiverMarshaller.java:967)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> bleObject(RiverMarshaller.java:967)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> verMarshaller.java:854)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(Ri
> verMarshaller.java:1032)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> bleObject(RiverMarshaller.java:988)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> verMarshaller.java:854)
> at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(Bl
> ockMarshaller.java:65)
> at org.jboss.marshalling.river.BlockMarshaller.writeObject(Bloc
> kMarshaller.java:56)
> at org.jboss.marshalling.MarshallerObjectOutputStream.writeObje
> ctOverride(MarshallerObjectOutputStream.java:50)
> at org.jboss.marshalling.river.RiverObjectOutputStream.writeObj
> ectOverride(RiverObjectOutputStream.java:179)
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
> at java.util.concurrent.CopyOnWriteArrayList.writeObject(CopyOn
> WriteArrayList.java:972)
> at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> thodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.marshalling.reflect.SerializableClass.callWriteObj
> ect(SerializableClass.java:271)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> bleObject(RiverMarshaller.java:976)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> verMarshaller.java:854)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(Ri
> verMarshaller.java:1032)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> bleObject(RiverMarshaller.java:988)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> verMarshaller.java:854)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(Ri
> verMarshaller.java:1032)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> bleObject(RiverMarshaller.java:988)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> bleObject(RiverMarshaller.java:967)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> bleObject(RiverMarshaller.java:967)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> verMarshaller.java:854)
> at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(Bl
> ockMarshaller.java:65)
> at org.jboss.marshalling.river.BlockMarshaller.writeObject(Bloc
> kMarshaller.java:56)
> at org.jboss.marshalling.MarshallerObjectOutputStream.writeObje
> ctOverride(MarshallerObjectOutputStream.java:50)
> at org.jboss.marshalling.river.RiverObjectOutputStream.writeObj
> ectOverride(RiverObjectOutputStream.java:179)
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
> at java.util.concurrent.ConcurrentHashMap.writeObject(Concurren
> tHashMap.java:1413)
> at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> thodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.marshalling.reflect.SerializableClass.callWriteObj
> ect(SerializableClass.java:271)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> bleObject(RiverMarshaller.java:976)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> verMarshaller.java:854)
> at org.jboss.marshalling.AbstractObjectOutput.writeObject(Abstr
> actObjectOutput.java:58)
> at org.jboss.marshalling.AbstractMarshaller.writeObject(Abstrac
> tMarshaller.java:111)
> at org.wildfly.clustering.marshalling.jboss.SimpleMarshalledVal
> ue.getBytes(SimpleMarshalledValue.java:76)
> at org.wildfly.clustering.marshalling.jboss.SimpleMarshalledVal
> ueExternalizer.writeObject(SimpleMarshalledValueExternalizer.java:49)
> at org.wildfly.clustering.marshalling.jboss.SimpleMarshalledVal
> ueExternalizer.writeObject(SimpleMarshalledValueExternalizer.java:34)
> at org.wildfly.clustering.infinispan.spi.marshalling.AdvancedEx
> ternalizerAdapter.writeObject(AdvancedExternalizerAdapter.java:49)
> at org.infinispan.marshall.core.ExternalizerTable$ForeignExtern
> alizerAdapter.writeObject(ExternalizerTable.java:534)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> verMarshaller.java:138)
> at org.jboss.marshalling.AbstractObjectOutput.writeObject(Abstr
> actObjectOutput.java:58)
> at org.jboss.marshalling.AbstractMarshaller.writeObject(Abstrac
> tMarshaller.java:111)
> at org.infinispan.marshall.exts.ReplicableCommandExternalizer.w
> riteCommandParameters(ReplicableCommandExternalizer.java:66)
> at org.infinispan.marshall.exts.ReplicableCommandExternalizer.w
> riteObject(ReplicableCommandExternalizer.java:51)
> at org.infinispan.marshall.exts.ReplicableCommandExternalizer.w
> riteObject(ReplicableCommandExternalizer.java:39)
> at org.infinispan.marshall.core.ExternalizerTable$ExternalizerA
> dapter.writeObject(ExternalizerTable.java:485)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> verMarshaller.java:138)
> at org.jboss.marshalling.AbstractObjectOutput.writeObject(Abstr
> actObjectOutput.java:58)
> at org.jboss.marshalling.AbstractMarshaller.writeObject(Abstrac
> tMarshaller.java:111)
> at org.infinispan.marshall.exts.ReplicableCommandExternalizer.w
> riteCommandParameters(ReplicableCommandExternalizer.java:66)
> at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.mar
> shallParameters(CacheRpcCommandExternalizer.java:128)
> at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.wri
> teObject(CacheRpcCommandExternalizer.java:112)
> at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.wri
> teObject(CacheRpcCommandExternalizer.java:68)
> at org.infinispan.marshall.core.ExternalizerTable$ExternalizerA
> dapter.writeObject(ExternalizerTable.java:485)
> at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> verMarshaller.java:138)
> at org.jboss.marshalling.AbstractObjectOutput.writeObject(Abstr
> actObjectOutput.java:58)
> at org.jboss.marshalling.AbstractMarshaller.writeObject(Abstrac
> tMarshaller.java:111)
> at org.infinispan.commons.marshall.jboss.AbstractJBossMarshalle
> r.objectToObjectStream(AbstractJBossMarshaller.java:72)
> at org.infinispan.marshall.core.VersionAwareMarshaller.objectTo
> Buffer(VersionAwareMarshaller.java:77)
> at org.infinispan.commons.marshall.AbstractMarshaller.objectToB
> uffer(AbstractMarshaller.java:41)
> at org.infinispan.commons.marshall.AbstractDelegatingMarshaller
> .objectToBuffer(AbstractDelegatingMarshaller.java:85)
> at org.infinispan.remoting.transport.jgroups.MarshallerAdapter.
> objectToBuffer(MarshallerAdapter.java:23)
> at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDis
> patcher.marshallCall(CommandAwareRpcDispatcher.java:256)
> at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDis
> patcher.processSingleCall(CommandAwareRpcDispatcher.java:274)
> at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDis
> patcher.invokeRemoteCommand(CommandAwareRpcDispatcher.java:130)
> ... 60 more
> Caused by: an exception which occurred:
> in field children
> in field reporter
> in field messages
> in field feedbackMessages
> in object java.util.concurrent.ConcurrentHashMap@2accdfac
> in object org.wildfly.clustering.marshalling.jboss.SimpleMarshalledVal
> ue@2accdfac
> in object org.infinispan.commands.write.PutKeyValueCommand@62e75532
> in object org.infinispan.commands.remote.SingleRpcCommand@bfef9aa
>
Reply | Threaded
Open this post in threaded view
|

Re: Error in commons collections4 Caused by java util ConcurrentModificationException

durairaj t
Thank you for your response,

I have gone through the java specifications for the same, but I just would
like to make sure that the error is not due to the "commons collections4"
API *bug*.

On Thu, Dec 28, 2017 at 2:30 PM, Gary Gregory <[hidden email]>
wrote:

> Just like it says on the Javadoc:
> https://docs.oracle.com/javase/7/docs/api/java/util/
> ConcurrentModificationException.html
>
> One piece of code must be reading while another is writing on the
> collection.
>
> Gary
>
> On Thu, Dec 28, 2017 at 11:21 AM, durairaj t <[hidden email]>
> wrote:
>
> > Hi All,
> >
> > I'm using comm.coll4 with JBOSS EAP sever 7.0 runtime and getting the
> below
> > error,
> >
> > I don't know whats going on, Any help?
> >
> >
> > Error Message:
> > ______________
> >
> > Caused by: java.util.ConcurrentModificationException
> > at org.apache.commons.collections4.map.AbstractLinkedMap$LinkIt
> > erator.nextEntry(AbstractLinkedMap.java:552)
> > at org.apache.commons.collections4.map.AbstractLinkedMap$LinkMa
> > pIterator.next(AbstractLinkedMap.java:357)
> > at org.apache.commons.collections4.map.AbstractHashedMap.doWrit
> > eObject(AbstractHashedMap.java:1233)
> > at org.apache.commons.collections4.map.LinkedMap.writeObject(
> > LinkedMap.java:124)
> > at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> > thodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke(Method.java:498)
> > at org.jboss.marshalling.reflect.SerializableClass.callWriteObj
> > ect(SerializableClass.java:271)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > bleObject(RiverMarshaller.java:976)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > verMarshaller.java:854)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(Ri
> > verMarshaller.java:1032)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > bleObject(RiverMarshaller.java:988)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > bleObject(RiverMarshaller.java:967)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > bleObject(RiverMarshaller.java:967)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > bleObject(RiverMarshaller.java:967)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > bleObject(RiverMarshaller.java:967)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > bleObject(RiverMarshaller.java:967)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > bleObject(RiverMarshaller.java:967)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > verMarshaller.java:854)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(Ri
> > verMarshaller.java:1032)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > bleObject(RiverMarshaller.java:988)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > verMarshaller.java:854)
> > at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(Bl
> > ockMarshaller.java:65)
> > at org.jboss.marshalling.river.BlockMarshaller.writeObject(Bloc
> > kMarshaller.java:56)
> > at org.jboss.marshalling.MarshallerObjectOutputStream.writeObje
> > ctOverride(MarshallerObjectOutputStream.java:50)
> > at org.jboss.marshalling.river.RiverObjectOutputStream.writeObj
> > ectOverride(RiverObjectOutputStream.java:179)
> > at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
> > at java.util.concurrent.CopyOnWriteArrayList.writeObject(CopyOn
> > WriteArrayList.java:972)
> > at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> > thodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke(Method.java:498)
> > at org.jboss.marshalling.reflect.SerializableClass.callWriteObj
> > ect(SerializableClass.java:271)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > bleObject(RiverMarshaller.java:976)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > verMarshaller.java:854)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(Ri
> > verMarshaller.java:1032)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > bleObject(RiverMarshaller.java:988)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > verMarshaller.java:854)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(Ri
> > verMarshaller.java:1032)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > bleObject(RiverMarshaller.java:988)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > bleObject(RiverMarshaller.java:967)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > bleObject(RiverMarshaller.java:967)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > verMarshaller.java:854)
> > at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(Bl
> > ockMarshaller.java:65)
> > at org.jboss.marshalling.river.BlockMarshaller.writeObject(Bloc
> > kMarshaller.java:56)
> > at org.jboss.marshalling.MarshallerObjectOutputStream.writeObje
> > ctOverride(MarshallerObjectOutputStream.java:50)
> > at org.jboss.marshalling.river.RiverObjectOutputStream.writeObj
> > ectOverride(RiverObjectOutputStream.java:179)
> > at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
> > at java.util.concurrent.ConcurrentHashMap.writeObject(Concurren
> > tHashMap.java:1413)
> > at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> > thodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke(Method.java:498)
> > at org.jboss.marshalling.reflect.SerializableClass.callWriteObj
> > ect(SerializableClass.java:271)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > bleObject(RiverMarshaller.java:976)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > verMarshaller.java:854)
> > at org.jboss.marshalling.AbstractObjectOutput.writeObject(Abstr
> > actObjectOutput.java:58)
> > at org.jboss.marshalling.AbstractMarshaller.writeObject(Abstrac
> > tMarshaller.java:111)
> > at org.wildfly.clustering.marshalling.jboss.SimpleMarshalledVal
> > ue.getBytes(SimpleMarshalledValue.java:76)
> > at org.wildfly.clustering.marshalling.jboss.SimpleMarshalledVal
> > ueExternalizer.writeObject(SimpleMarshalledValueExternalizer.java:49)
> > at org.wildfly.clustering.marshalling.jboss.SimpleMarshalledVal
> > ueExternalizer.writeObject(SimpleMarshalledValueExternalizer.java:34)
> > at org.wildfly.clustering.infinispan.spi.marshalling.AdvancedEx
> > ternalizerAdapter.writeObject(AdvancedExternalizerAdapter.java:49)
> > at org.infinispan.marshall.core.ExternalizerTable$ForeignExtern
> > alizerAdapter.writeObject(ExternalizerTable.java:534)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > verMarshaller.java:138)
> > at org.jboss.marshalling.AbstractObjectOutput.writeObject(Abstr
> > actObjectOutput.java:58)
> > at org.jboss.marshalling.AbstractMarshaller.writeObject(Abstrac
> > tMarshaller.java:111)
> > at org.infinispan.marshall.exts.ReplicableCommandExternalizer.w
> > riteCommandParameters(ReplicableCommandExternalizer.java:66)
> > at org.infinispan.marshall.exts.ReplicableCommandExternalizer.w
> > riteObject(ReplicableCommandExternalizer.java:51)
> > at org.infinispan.marshall.exts.ReplicableCommandExternalizer.w
> > riteObject(ReplicableCommandExternalizer.java:39)
> > at org.infinispan.marshall.core.ExternalizerTable$ExternalizerA
> > dapter.writeObject(ExternalizerTable.java:485)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > verMarshaller.java:138)
> > at org.jboss.marshalling.AbstractObjectOutput.writeObject(Abstr
> > actObjectOutput.java:58)
> > at org.jboss.marshalling.AbstractMarshaller.writeObject(Abstrac
> > tMarshaller.java:111)
> > at org.infinispan.marshall.exts.ReplicableCommandExternalizer.w
> > riteCommandParameters(ReplicableCommandExternalizer.java:66)
> > at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.mar
> > shallParameters(CacheRpcCommandExternalizer.java:128)
> > at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.wri
> > teObject(CacheRpcCommandExternalizer.java:112)
> > at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.wri
> > teObject(CacheRpcCommandExternalizer.java:68)
> > at org.infinispan.marshall.core.ExternalizerTable$ExternalizerA
> > dapter.writeObject(ExternalizerTable.java:485)
> > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > verMarshaller.java:138)
> > at org.jboss.marshalling.AbstractObjectOutput.writeObject(Abstr
> > actObjectOutput.java:58)
> > at org.jboss.marshalling.AbstractMarshaller.writeObject(Abstrac
> > tMarshaller.java:111)
> > at org.infinispan.commons.marshall.jboss.AbstractJBossMarshalle
> > r.objectToObjectStream(AbstractJBossMarshaller.java:72)
> > at org.infinispan.marshall.core.VersionAwareMarshaller.objectTo
> > Buffer(VersionAwareMarshaller.java:77)
> > at org.infinispan.commons.marshall.AbstractMarshaller.objectToB
> > uffer(AbstractMarshaller.java:41)
> > at org.infinispan.commons.marshall.AbstractDelegatingMarshaller
> > .objectToBuffer(AbstractDelegatingMarshaller.java:85)
> > at org.infinispan.remoting.transport.jgroups.MarshallerAdapter.
> > objectToBuffer(MarshallerAdapter.java:23)
> > at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDis
> > patcher.marshallCall(CommandAwareRpcDispatcher.java:256)
> > at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDis
> > patcher.processSingleCall(CommandAwareRpcDispatcher.java:274)
> > at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDis
> > patcher.invokeRemoteCommand(CommandAwareRpcDispatcher.java:130)
> > ... 60 more
> > Caused by: an exception which occurred:
> > in field children
> > in field reporter
> > in field messages
> > in field feedbackMessages
> > in object java.util.concurrent.ConcurrentHashMap@2accdfac
> > in object org.wildfly.clustering.marshalling.jboss.SimpleMarshalledVal
> > ue@2accdfac
> > in object org.infinispan.commands.write.PutKeyValueCommand@62e75532
> > in object org.infinispan.commands.remote.SingleRpcCommand@bfef9aa
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Error in commons collections4 Caused by java util ConcurrentModificationException

garydgregory
Hi,

The Commons Collection code throws ConcurrentModificationException when it
detects error conditions. The JRE collections do the same (the ones that
are not thread-safe.)

That does not help much, sorry. I'm afraid you are left with a tricky
debugging session.

It is _possible_ that there is a bug in Commons Collections of course. In
which case, an analysis or reproducible test case would be most welcome.

Also, please make sure you are using the latest version: 4.1.

Thank you,
Gary

On Thu, Dec 28, 2017 at 12:51 PM, durairaj t <[hidden email]> wrote:

> Thank you for your response,
>
> I have gone through the java specifications for the same, but I just would
> like to make sure that the error is not due to the "commons collections4"
> API *bug*.
>
> On Thu, Dec 28, 2017 at 2:30 PM, Gary Gregory <[hidden email]>
> wrote:
>
> > Just like it says on the Javadoc:
> > https://docs.oracle.com/javase/7/docs/api/java/util/
> > ConcurrentModificationException.html
> >
> > One piece of code must be reading while another is writing on the
> > collection.
> >
> > Gary
> >
> > On Thu, Dec 28, 2017 at 11:21 AM, durairaj t <[hidden email]>
> > wrote:
> >
> > > Hi All,
> > >
> > > I'm using comm.coll4 with JBOSS EAP sever 7.0 runtime and getting the
> > below
> > > error,
> > >
> > > I don't know whats going on, Any help?
> > >
> > >
> > > Error Message:
> > > ______________
> > >
> > > Caused by: java.util.ConcurrentModificationException
> > > at org.apache.commons.collections4.map.AbstractLinkedMap$LinkIt
> > > erator.nextEntry(AbstractLinkedMap.java:552)
> > > at org.apache.commons.collections4.map.AbstractLinkedMap$LinkMa
> > > pIterator.next(AbstractLinkedMap.java:357)
> > > at org.apache.commons.collections4.map.AbstractHashedMap.doWrit
> > > eObject(AbstractHashedMap.java:1233)
> > > at org.apache.commons.collections4.map.LinkedMap.writeObject(
> > > LinkedMap.java:124)
> > > at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
> > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> > > thodAccessorImpl.java:43)
> > > at java.lang.reflect.Method.invoke(Method.java:498)
> > > at org.jboss.marshalling.reflect.SerializableClass.callWriteObj
> > > ect(SerializableClass.java:271)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > > bleObject(RiverMarshaller.java:976)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > > verMarshaller.java:854)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(Ri
> > > verMarshaller.java:1032)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > > bleObject(RiverMarshaller.java:988)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > > bleObject(RiverMarshaller.java:967)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > > bleObject(RiverMarshaller.java:967)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > > bleObject(RiverMarshaller.java:967)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > > bleObject(RiverMarshaller.java:967)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > > bleObject(RiverMarshaller.java:967)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > > bleObject(RiverMarshaller.java:967)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > > verMarshaller.java:854)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(Ri
> > > verMarshaller.java:1032)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > > bleObject(RiverMarshaller.java:988)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > > verMarshaller.java:854)
> > > at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(Bl
> > > ockMarshaller.java:65)
> > > at org.jboss.marshalling.river.BlockMarshaller.writeObject(Bloc
> > > kMarshaller.java:56)
> > > at org.jboss.marshalling.MarshallerObjectOutputStream.writeObje
> > > ctOverride(MarshallerObjectOutputStream.java:50)
> > > at org.jboss.marshalling.river.RiverObjectOutputStream.writeObj
> > > ectOverride(RiverObjectOutputStream.java:179)
> > > at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
> > > at java.util.concurrent.CopyOnWriteArrayList.writeObject(CopyOn
> > > WriteArrayList.java:972)
> > > at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
> > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> > > thodAccessorImpl.java:43)
> > > at java.lang.reflect.Method.invoke(Method.java:498)
> > > at org.jboss.marshalling.reflect.SerializableClass.callWriteObj
> > > ect(SerializableClass.java:271)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > > bleObject(RiverMarshaller.java:976)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > > verMarshaller.java:854)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(Ri
> > > verMarshaller.java:1032)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > > bleObject(RiverMarshaller.java:988)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > > verMarshaller.java:854)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(Ri
> > > verMarshaller.java:1032)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > > bleObject(RiverMarshaller.java:988)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > > bleObject(RiverMarshaller.java:967)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > > bleObject(RiverMarshaller.java:967)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > > verMarshaller.java:854)
> > > at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(Bl
> > > ockMarshaller.java:65)
> > > at org.jboss.marshalling.river.BlockMarshaller.writeObject(Bloc
> > > kMarshaller.java:56)
> > > at org.jboss.marshalling.MarshallerObjectOutputStream.writeObje
> > > ctOverride(MarshallerObjectOutputStream.java:50)
> > > at org.jboss.marshalling.river.RiverObjectOutputStream.writeObj
> > > ectOverride(RiverObjectOutputStream.java:179)
> > > at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
> > > at java.util.concurrent.ConcurrentHashMap.writeObject(Concurren
> > > tHashMap.java:1413)
> > > at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
> > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> > > thodAccessorImpl.java:43)
> > > at java.lang.reflect.Method.invoke(Method.java:498)
> > > at org.jboss.marshalling.reflect.SerializableClass.callWriteObj
> > > ect(SerializableClass.java:271)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializa
> > > bleObject(RiverMarshaller.java:976)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > > verMarshaller.java:854)
> > > at org.jboss.marshalling.AbstractObjectOutput.writeObject(Abstr
> > > actObjectOutput.java:58)
> > > at org.jboss.marshalling.AbstractMarshaller.writeObject(Abstrac
> > > tMarshaller.java:111)
> > > at org.wildfly.clustering.marshalling.jboss.SimpleMarshalledVal
> > > ue.getBytes(SimpleMarshalledValue.java:76)
> > > at org.wildfly.clustering.marshalling.jboss.SimpleMarshalledVal
> > > ueExternalizer.writeObject(SimpleMarshalledValueExternalizer.java:49)
> > > at org.wildfly.clustering.marshalling.jboss.SimpleMarshalledVal
> > > ueExternalizer.writeObject(SimpleMarshalledValueExternalizer.java:34)
> > > at org.wildfly.clustering.infinispan.spi.marshalling.AdvancedEx
> > > ternalizerAdapter.writeObject(AdvancedExternalizerAdapter.java:49)
> > > at org.infinispan.marshall.core.ExternalizerTable$ForeignExtern
> > > alizerAdapter.writeObject(ExternalizerTable.java:534)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > > verMarshaller.java:138)
> > > at org.jboss.marshalling.AbstractObjectOutput.writeObject(Abstr
> > > actObjectOutput.java:58)
> > > at org.jboss.marshalling.AbstractMarshaller.writeObject(Abstrac
> > > tMarshaller.java:111)
> > > at org.infinispan.marshall.exts.ReplicableCommandExternalizer.w
> > > riteCommandParameters(ReplicableCommandExternalizer.java:66)
> > > at org.infinispan.marshall.exts.ReplicableCommandExternalizer.w
> > > riteObject(ReplicableCommandExternalizer.java:51)
> > > at org.infinispan.marshall.exts.ReplicableCommandExternalizer.w
> > > riteObject(ReplicableCommandExternalizer.java:39)
> > > at org.infinispan.marshall.core.ExternalizerTable$ExternalizerA
> > > dapter.writeObject(ExternalizerTable.java:485)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > > verMarshaller.java:138)
> > > at org.jboss.marshalling.AbstractObjectOutput.writeObject(Abstr
> > > actObjectOutput.java:58)
> > > at org.jboss.marshalling.AbstractMarshaller.writeObject(Abstrac
> > > tMarshaller.java:111)
> > > at org.infinispan.marshall.exts.ReplicableCommandExternalizer.w
> > > riteCommandParameters(ReplicableCommandExternalizer.java:66)
> > > at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.mar
> > > shallParameters(CacheRpcCommandExternalizer.java:128)
> > > at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.wri
> > > teObject(CacheRpcCommandExternalizer.java:112)
> > > at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.wri
> > > teObject(CacheRpcCommandExternalizer.java:68)
> > > at org.infinispan.marshall.core.ExternalizerTable$ExternalizerA
> > > dapter.writeObject(ExternalizerTable.java:485)
> > > at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> > > verMarshaller.java:138)
> > > at org.jboss.marshalling.AbstractObjectOutput.writeObject(Abstr
> > > actObjectOutput.java:58)
> > > at org.jboss.marshalling.AbstractMarshaller.writeObject(Abstrac
> > > tMarshaller.java:111)
> > > at org.infinispan.commons.marshall.jboss.AbstractJBossMarshalle
> > > r.objectToObjectStream(AbstractJBossMarshaller.java:72)
> > > at org.infinispan.marshall.core.VersionAwareMarshaller.objectTo
> > > Buffer(VersionAwareMarshaller.java:77)
> > > at org.infinispan.commons.marshall.AbstractMarshaller.objectToB
> > > uffer(AbstractMarshaller.java:41)
> > > at org.infinispan.commons.marshall.AbstractDelegatingMarshaller
> > > .objectToBuffer(AbstractDelegatingMarshaller.java:85)
> > > at org.infinispan.remoting.transport.jgroups.MarshallerAdapter.
> > > objectToBuffer(MarshallerAdapter.java:23)
> > > at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDis
> > > patcher.marshallCall(CommandAwareRpcDispatcher.java:256)
> > > at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDis
> > > patcher.processSingleCall(CommandAwareRpcDispatcher.java:274)
> > > at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDis
> > > patcher.invokeRemoteCommand(CommandAwareRpcDispatcher.java:130)
> > > ... 60 more
> > > Caused by: an exception which occurred:
> > > in field children
> > > in field reporter
> > > in field messages
> > > in field feedbackMessages
> > > in object java.util.concurrent.ConcurrentHashMap@2accdfac
> > > in object org.wildfly.clustering.marshalling.jboss.SimpleMarshalledVal
> > > ue@2accdfac
> > > in object org.infinispan.commands.write.PutKeyValueCommand@62e75532
> > > in object org.infinispan.commands.remote.SingleRpcCommand@bfef9aa
> > >
> >
>