2 Replies Latest reply on Aug 5, 2011 2:01 AM by seb seb

    [RichFaces] NotSerializableException: javax.servlet.jsp.jstl.core.IteratedExpression

    seb seb Newbie

      Hello guys,

      i have this kind of exception while running in clustering production servers.

      ERROR [JBossCacheService] 84518 externalizeSession(): exception occurred externalizing session SessionBasedClusteredSession[id: LUhoHe1koVQi2wEK72yvSQ** lastAccessedTime: 1308636510445 version: 4 lastOutdated: 0]
      java.io.NotSerializableException: javax.servlet.jsp.jstl.core.IteratedExpression
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
          at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
          at java.util.HashMap.writeObject(HashMap.java:985)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
          at org.apache.el.lang.VariableMapperImpl.writeExternal(VariableMapperImpl.java:54)
          at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
          at org.apache.el.ValueExpressionImpl.writeExternal(ValueExpressionImpl.java:257)
          at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
          at org.apache.jasper.el.JspValueExpression.writeExternal(JspValueExpression.java:129)
          at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
          at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
          at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
          at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
          at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
          at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
          at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
          at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
          at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
          at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
          at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
          at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
          at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
          at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
          at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
          at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
          at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
          at java.util.HashMap.writeObject(HashMap.java:985)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
          at java.util.HashMap.writeObject(HashMap.java:985)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
          at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
          at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:380)
          at org.ajax4jsf.application.AjaxStateHolder.writeObject(AjaxStateHolder.java:197)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
          at java.util.concurrent.ConcurrentHashMap.writeObject(ConcurrentHashMap.java:1380)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
          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:524)
          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.jboss.web.tomcat.service.sso.ClusteredSingleSignOn.invoke(ClusteredSingleSignOn.java:676)
          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)
      

      It happens when i want to display a datable. And it seems it was caused by the using of an hashmap, if i try by a list it works. But my displaying is to complex to use it. Of course all my custom objects are serialisable . I use this méthod to diplay rows

      <h:outputText id="lib_pn" value="#{bean.map[element].myvalue}"/>

      bean = my managedBean

      map = my hashMap contenig the list of elements

      element = the current line given by rich:datatable

      myValue = An anttibut of a custom object stored in the map

       

      I'm using richfaces 3.3.3 and an old version pf Jboss 4.2.2GA

       

      Thank you very much for your help