[jboss-user] [Clustering/JBoss] - ConcurrentModificationException during session serialization

stani0 do-not-reply at jboss.com
Sat May 31 14:59:52 EDT 2008


I've initially posted this in the RichFaces users forum:

http://www.jboss.com/index.html?module=bb&op=viewtopic&t=136368

I haven't got reply there so far and I'm unsure where is the exact problem so I've decided to post it here, too.

The problem as it seems to be is the web session gets modified while it is been serialized.  Specifically the serialization of an org.ajax4jsf.util.LRUMap instance holding some JSF(?) state is failing with ConcurrentModificationException, so I've first thought it could be a RichFaces library problem.

This is my development configuration (1 node cluster):

JBossAS 4.2.2.GA
Seam 2.0.2.SP1
RichFaces 3.2.0.SR1
Sun's JDK 1.5.0_15
Windows XP Pro SP2

The same problem appers with 2 nodes configuration on FreeBSD 7.0 with Sun's JDK 1.5.0_11.

Tell me what info I could supply more to clarify the issue.  Here's the full stack trace of the exception:
15:27:13,187 ERROR [JBossCacheService] externalizeSession(): exception occurred externalizing session SessionBasedClusteredSession[id: F3m44XY0NwX7HVPjsweIDw** lastAccessedTime: 1211977633015 version: 39 lastOutdated: 0]
  | java.util.ConcurrentModificationException
  |         at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:365)
  |         at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:384)
  |         at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:383)
  |         at java.util.HashMap.writeObject(HashMap.java:1037)
  |         at sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
  |         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
  |         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
  |         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
  |         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
  |         at java.util.HashMap.writeObject(HashMap.java:1039)
  |         at sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
  |         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
  |         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
  |         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
  |         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
  |         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
  |         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
  |         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
  |         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
  |         at java.util.concurrent.ConcurrentHashMap.writeObject(ConcurrentHashMap.java:1380)
  |         at sun.reflect.GeneratedMethodAccessor290.invoke(Unknown Source)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
  |         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
  |         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
  |         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
  |         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
  |         at org.jboss.web.tomcat.service.session.SessionBasedClusteredSession.writeExternal(SessionBasedClusteredSession.java:175)
  |         at org.jboss.web.tomcat.service.session.JBossCacheService.externalizeSession(JBossCacheService.java:1027)
  |         at org.jboss.web.tomcat.service.session.JBossCacheService.putSession(JBossCacheService.java:316)
  |         at org.jboss.web.tomcat.service.session.JBossCacheClusteredSession.processSessionRepl(JBossCacheClusteredSession.java:121)
  |         at org.jboss.web.tomcat.service.session.JBossCacheManager.processSessionRepl(JBossCacheManager.java:1097)
  |         at org.jboss.web.tomcat.service.session.JBossCacheManager.storeSession(JBossCacheManager.java:652)
  |         at org.jboss.web.tomcat.service.session.InstantSnapshotManager.snapshot(InstantSnapshotManager.java:49)
  |         at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:98)
  |         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
  |         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  |         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  |         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  |         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  |         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
  |         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  |         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
  |         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
  |         at java.lang.Thread.run(Thread.java:595)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154849#4154849

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154849



More information about the jboss-user mailing list