8 Replies Latest reply on Sep 12, 2011 8:11 AM by Mallikarjun Reddy

    Problem externalizeSession Jboss 4.0.5

    clemente cioffi Newbie

      Hi, can you help me about this problem??

      I'm trying to deploy a seam application(using also jsf with icefaces) on jboss 4.0.5 GA with EJB3-Clustered configuration.
      I think that the deploy goes fine but when I try to access to index of my application, I see this error:

      11:00:58,768 ERROR [STDERR] 07-Feb-2007 11:00:58 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/C:/Program%20Files/jboss-4.0.5.GA/server/def
      ault/./tmp/deploy/tmp63271cerssvd.ear-contents/cerssvd-exp.war/WEB-INF/lib/icefa
      ces-facelets.jar!/META-INF/jstl-core.taglib.xml
      11:00:58,808 ERROR [STDERR] 07-Feb-2007 11:00:58 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/C:/Program%20Files/jboss-4.0.5.GA/server/def
      ault/./tmp/deploy/tmp63271cerssvd.ear-contents/cerssvd-exp.war/WEB-INF/lib/jboss
      -seam-ui.jar!/META-INF/seam.taglib.xml
      11:00:58,838 ERROR [STDERR] 07-Feb-2007 11:00:58 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/C:/Program%20Files/jboss-4.0.5.GA/server/default/./tmp/deploy/tmp63271cerssvd.ear-contents/cerssvd-exp.war/WEB-INF/lib/icefa
      ces-comps.jar!/META-INF/facelet/icefaces.taglib.xml
      11:00:58,919 ERROR [STDERR] 07-Feb-2007 11:00:58 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/C:/Program%20Files/jboss-4.0.5.GA/server/def
      ault/./tmp/deploy/tmp63271cerssvd.ear-contents/cerssvd-exp.war/WEB-INF/lib/icefa
      ces-facelets.jar!/META-INF/jsf-core.taglib.xml
      11:00:58,969 ERROR [STDERR] 07-Feb-2007 11:00:58 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/C:/Program%20Files/jboss-4.0.5.GA/server/def
      ault/./tmp/deploy/tmp63271cerssvd.ear-contents/cerssvd-exp.war/WEB-INF/lib/icefa
      ces-facelets.jar!/META-INF/jsf-ui.taglib.xml
      11:00:58,989 ERROR [STDERR] 07-Feb-2007 11:00:58 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/C:/Program%20Files/jboss-4.0.5.GA/server/default/./tmp/deploy/tmp63271cerssvd.ear-contents/cerssvd-exp.war/WEB-INF/lib/icefa
      ces-facelets.jar!/META-INF/jstl-fn.taglib.xml
      11:00:59,019 ERROR [STDERR] 07-Feb-2007 11:00:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/C:/Program%20Files/jboss-4.0.5.GA/server/def
      ault/./tmp/deploy/tmp63271cerssvd.ear-contents/cerssvd-exp.war/WEB-INF/lib/icefa
      ces-facelets.jar!/META-INF/jsf-html.taglib.xml
      11:01:01,773 ERROR [JBossCacheService] externalizeSession(): exception occurred externalizing session SessionBasedClusteredSession[id: NhCr1Y33cNsWaawV84WOEg**.
      node1 lastAccessedTime: 1170846057627 version: 1 lastOutdated: 0]
      java.io.NotSerializableException: org.apache.catalina.session.StandardSessionFacade

      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)

      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java
      :1509)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:14
      74)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.jav
      a:1392)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)

      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
      at java.util.Hashtable.writeObject(Hashtable.java:824)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:94
      5)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:14
      61)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.jav
      a:1392)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)

      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
      at org.jboss.web.tomcat.tc5.session.SessionBasedClusteredSession.writeEx
      ternal(SessionBasedClusteredSession.java:175)
      at org.jboss.web.tomcat.tc5.session.JBossCacheService.externalizeSession
      (JBossCacheService.java:1023)
      at org.jboss.web.tomcat.tc5.session.JBossCacheService.putSession(JBossCa
      cheService.java:312)
      at org.jboss.web.tomcat.tc5.session.JBossCacheClusteredSession.processSe
      ssionRepl(JBossCacheClusteredSession.java:121)
      at org.jboss.web.tomcat.tc5.session.JBossCacheManager.processSessionRepl
      (JBossCacheManager.java:1093)
      at org.jboss.web.tomcat.tc5.session.JBossCacheManager.storeSession(JBoss
      CacheManager.java:648)
      at org.jboss.web.tomcat.tc5.session.InstantSnapshotManager.snapshot(Inst
      antSnapshotManager.java:49)
      at org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(Cluster
      edSessionValve.java:98)
      at org.jboss.web.tomcat.tc5.session.JvmRouteValve.invoke(JvmRouteValve.j
      ava:84)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
      torBase.java:432)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      e.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:105)
      at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConne
      ctionValve.java:156)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
      rocessConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
      int.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
      kerThread.java:112)
      at java.lang.Thread.run(Thread.java:619)


      Do you know if it is a problem about the jboss configuration or depend on some others things?

      Thank you

        • 1. Re: Problem externalizeSession Jboss 4.0.5
          Brian Stansberry Master

          This is happening because a session object is being inserted into a session as an attribute, e.g.

          HttpSession session = request.getSession();
          session.setAttribute(session);

          You need to find out why that's happening as it won't work.

          • 2. Re: Problem externalizeSession Jboss 4.0.5
            clemente cioffi Newbie

            Thnk you for you answer.
            In not-clustered environment, the application works fine.
            How can I individuate where I make the mistake?

            • 3. Re: Problem externalizeSession Jboss 4.0.5
              Brian Stansberry Master

              You can code up an implementation of javax.servlet.http.HttpSessionAttributeListener that tries to serialize each attribute when the attributeAdded or attributeReplaced callbacks are called. If serialization fails, log the attribute name and the stack trace. Then tweak your web.xml to include the listener. Use in dev environment only of course.

              I wrote such a thing a while back; it could also descend into collections to try to find any offending collection element. But I can't find it. Ignoring the descending into collections part, it's pretty easy to do, so you could code one up.

              • 4. Re: Problem externalizeSession Jboss 4.0.5
                clemente cioffi Newbie

                Thank you very much for your help.
                I made the listener and I think the error is raised in this point:

                2007-02-08 12:22:23,744 INFO [STDOUT] Aromentooooooooooooooooooo:
                2007-02-08 12:22:23,744 INFO [STDOUT] Name: org.jboss.seam.core.conversationEntries
                2007-02-08 12:22:23,744 INFO [STDOUT] Value: ConversationEntries([])

                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.conversationEntries
                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.conversationEntries
                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.contexts.Lifecycle] After render response, destroying contexts
                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying business process context
                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroyContext.BUSINESS_PROCESS
                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postDestroyContext.BUSINESS_PROCESS
                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying conversation context
                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroyContext.CONVERSATION
                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.persistenceContexts
                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.core.persistenceContexts
                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.facesMessages
                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.core.facesMessages
                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.conversation
                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.core.conversation
                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.contexts.Contexts] destroying: entityManager
                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroy.entityManager
                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.core.ManagedPersistenceContext] destroying seam managed persistence context for persistence unit: java:/cerssvdEntityManagerFactory
                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postDestroyContext.CONVERSATION
                2007-02-08 12:22:23,744 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing server-side conversation context
                2007-02-08 12:22:23,754 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing session context
                2007-02-08 12:22:23,754 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying event context
                2007-02-08 12:22:23,754 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroyContext.EVENT
                2007-02-08 12:22:23,754 DEBUG [org.jboss.seam.contexts.Contexts] destroying: icesoft_javascript_request_key_7698193
                2007-02-08 12:22:23,754 DEBUG [org.jboss.seam.contexts.Contexts] destroying: com.icesoft.faces.removeSeamContexts
                2007-02-08 12:22:23,754 DEBUG [org.jboss.seam.contexts.Contexts] destroying: facelets.Encoding
                2007-02-08 12:22:23,754 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.manager
                2007-02-08 12:22:23,754 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.core.manager
                2007-02-08 12:22:23,754 DEBUG [org.jboss.seam.contexts.Contexts] destroying: msg
                2007-02-08 12:22:23,754 DEBUG [org.jboss.seam.contexts.Contexts] destroying: loginUser
                2007-02-08 12:22:23,754 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroy.loginUser
                2007-02-08 12:22:23,754 DEBUG [org.jboss.seam.contexts.Contexts] destroying: com.sun.facelets.legacy.ELCONTEXT
                2007-02-08 12:22:23,754 DEBUG [org.jboss.seam.contexts.Contexts] destroying: servletkey
                2007-02-08 12:22:23,754 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postDestroyContext.EVENT
                2007-02-08 12:22:23,754 DEBUG [org.jboss.seam.contexts.Lifecycle] <<< End web request
                2007-02-08 12:22:23,764 DEBUG [com.icesoft.faces.env.ServletEnvironmentRequest] Acegi Security not detected.
                2007-02-08 12:22:23,774 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
                2007-02-08 12:22:23,774 DEBUG [org.jboss.seam.servlet.SeamExceptionFilter] ended request
                2007-02-08 12:22:23,824 ERROR [org.jboss.web.tomcat.tc5.session.JBossCacheService] externalizeSession(): exception occurred externalizing session SessionBasedClusteredSession[id: h7IT2+A6DGtkY+7MwiSH1Q**.node1 lastAccessedTime: 1170937335112 version: 1 lastOutdated: 0]
                java.io.NotSerializableException: org.apache.catalina.session.StandardSessionFacade
                at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
                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.Hashtable.writeObject(Hashtable.java:824)
                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:597)
                at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
                at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)

                What do you think about that?
                Can you help me another time??

                Thank you!!!

                • 5. Re: Problem externalizeSession Jboss 4.0.5
                  Brian Stansberry Master

                  No, unfortunately I can't :(

                  I suggest you take this to the Seam forum, as they'll have the needed understanding of what's being placed in the session and why.

                  • 6. Re: Problem externalizeSession Jboss 4.0.5
                    clemente cioffi Newbie

                    Thank you very much. I'll try on Seam Forum.
                    You're vary kind.

                    • 7. Re: Problem externalizeSession Jboss 4.0.5
                      praveena chalamcharla Newbie

                      Hi,
                      I got a similar error when trying with Jboss 4.2.2.GA clusters. Please let me know what exactly would be the reason for occurance of this exception.

                      I have already posted this in another thread.


                      Thank you for in advance.

                      • 8. Re: Problem externalizeSession Jboss 4.0.5
                        Mallikarjun Reddy Newbie

                        Hi,

                        I got below  error when trying with Jboss 4.2.2.GA clusters. Please let me know what exactly would be the reason for occurance of this exception.I Need do it in production server

                         

                        17:02:53,935 ERROR [JBossCacheService] externalizeSession(): exception occurred externalizing session

                        SessionBasedClusteredSession[id: 0lBL0ZJumYyLQo2L1L7mKw**.node2 lastAccessedTime: 1315827164904 vers

                        ion: 1 lastOutdated: 0]

                        java.io.NotSerializableException: com.sun.faces.context.FacesContextImpl

                                at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)

                                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.concurrent.ConcurrentHashMap.writeObject(ConcurrentHashMap.java:1247)

                                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: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.writeObject(ObjectOutputStream.java:326)

                                at org.jboss.web.tomcat.service.session.SessionBasedClusteredSession.writeExternal(SessionBas

                        edClusteredSession.java:175)

                                at org.jboss.web.tomcat.service.session.JBossCacheService.externalizeSession(JBossCacheServic

                        e.java:1027)

                                at org.jboss.web.tomcat.service.session.JBossCacheService.putSession(JBossCacheService.java:3

                        16)

                                at org.jboss.web.tomcat.service.session.JBossCacheClusteredSession.processSessionRepl(JBossCa

                        cheClusteredSession.java:121)

                                at org.jboss.web.tomcat.service.session.JBossCacheManager.processSessionRepl(JBossCacheManage

                        r.java:1097)

                                at org.jboss.web.tomcat.service.session.JBossCacheManager.storeSession(JBossCacheManager.java

                        :652)

                                at org.jboss.web.tomcat.service.session.InstantSnapshotManager.snapshot(InstantSnapshotManage

                        r.java:49)

                                at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.ja

                        va:98)

                                at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(JvmRouteValve.java:84)

                                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:1

                        57)

                                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)

                                at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)

                                at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)

                                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)

                                at java.lang.Thread.run(Thread.java:619)