6 Replies Latest reply on Sep 26, 2002 8:54 AM by Julian Gosnell

    Http Session Clustering- serialization error

    Kevin Yoshiyama Newbie

      I'm using 3.0.1 and have my setup configured to do session clustering with jbossha-httpsession.sar

      I am building my class files with JDK1.4.0

      I have one object in my session, a plain JavaBean which has been defined to implement Serializable.

      Now, my problem is that I'm getting a serialization exception:

      18:23:55,503 ERROR [MarshallingInterceptor] could not get Attribute: navigationController
      java.io.InvalidClassException: java.lang.Integer; local class incompatible: stream classdesc serialVersionUID = 1360826667802527544, local class serialVersionUID = 1360826667806852920
      at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:454)

      I'm not sure what is causing this exception, but my guess is that the Integer class somehow has two different versions, and the newer version is not defined to be compatible with the previous version? Or is something else going on here?

      I will try to run my application with jdk1.3.0 and see if it's any better

      Kevin Yoshiyama

        • 1. Re: Http Session Clustering- serialization error
          Greg Turner Apprentice

          There is a bug in that class that I discovered over the weekend and provided Jules Gosnell, the Jetty man, the fix for. He was going to check in fix. So, you have 2 options. Either get the latest from sourceforge, assuming the fix is checked in, or I can tell you what need to be changed and you can fix the class. In that case, in the marshall method change the return type from String to byte[]. And in the method, change return from baos.toString() to baos.toByteArray(). Then in demarshal method change signature from String to byte[]. Then in the method, pass the byte array to to the constructor of ByteArrayInputStream instead of the String. Then in class, change some casts from (String) to (byte[]) as required to make it compile.

          • 2. Re: Http Session Clustering- serialization error
            Kevin Yoshiyama Newbie

            Thank you very much for your response. I will get CVS HEAD today, and hopefully the path will be there.

            Thanks again,
            Kevin Yoshiyama

            • 3. Re: Http Session Clustering- serialization error
              Kevin Yoshiyama Newbie

              It doesn't look like it's been checked in yet. I modified the file as suggested and am testing it out now. So far, it looks good.

              Kevin Yoshiyama

              • 4. Re: Http Session Clustering- serialization error
                Vladyslav Kosulin Newbie

                It is still not in HEAD, I guess, because I've get the same error with J2SDK 1.4.1 and JBoss 3.02, where they still use String instead of byte[], only the line number is slightly different:

                ERROR [MarshallingInterceptor] could not get Attribute: clients
                java.io.InvalidClassException: java.util.ArrayList; local class incompatible: stream classdesc serialVersionUID = 8664875232659988799, local class serialVersionUID = 8683452581122892189
                at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:459)
                at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521)
                at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
                at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
                at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
                at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
                at org.mortbay.j2ee.session.MarshallingInterceptor.demarshal(MarshallingInterceptor.java:84)
                at org.mortbay.j2ee.session.MarshallingInterceptor.getAttribute(MarshallingInterceptor.java:93)
                at org.mortbay.j2ee.session.StateInterceptor.getAttribute(StateInterceptor.java:43)
                at org.mortbay.j2ee.session.StateInterceptor.getAttribute(StateInterceptor.java:43)
                at org.mortbay.j2ee.session.TypeCheckingInterceptor.getAttribute(TypeCheckingInterceptor.java:90)
                at org.mortbay.j2ee.session.StateAdaptor.getAttribute(StateAdaptor.java:204)
                at org.apache.jasper.runtime.PageContextImpl.getAttribute(PageContextImpl.java:217)
                at org.apache.taglibs.standard.lang.jstl.ImplicitObjects$3.getValue(ImplicitObjects.java:363)
                at org.apache.taglibs.standard.lang.jstl.EnumeratedMap.get(EnumeratedMap.java:115)
                at org.apache.taglibs.standard.lang.jstl.ArraySuffix.evaluate(ArraySuffix.java:214)
                at org.apache.taglibs.standard.lang.jstl.ComplexValue.evaluate(ComplexValue.java:141)
                at org.apache.taglibs.standard.lang.jstl.ELEvaluator.evaluate(ELEvaluator.java:235)
                at org.apache.taglibs.standard.lang.jstl.ELEvaluator.evaluate(ELEvaluator.java:198)
                at org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:134)
                at org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.evaluate(ExpressionEvaluatorManager.java:112)
                at org.apache.taglibs.standard.tag.el.core.ForEachTag.evaluateExpressions(ForEachTag.java:191)
                at org.apache.taglibs.standard.tag.el.core.ForEachTag.doStartTag(ForEachTag.java:102)
                at org.apache.jsp.showAccountHoldersTable$jsp._jspService(showAccountHoldersTable$jsp.java:72)
                at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:198)
                at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
                at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:344)
                at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:361)
                at com.wsc.

                • 5. Re: Http Session Clustering- serialization error
                  Julian Gosnell Expert

                  Guys - It will definitely be on Branch_3_2

                  All the work that I have been doing is on Branch_3_2 - because this is the release that we have been trying to get out of the door.

                  I will merge it onto Branch_3_0 and HEAD eventually, when I am happy with it.

                  Try this on the 3.2beta - or if you want to run on 3.0.x, get the jbossweb.sar out of the beta and use that in 3.0.x.

                  Please keep me posted on your progress.


                  • 6. Re: Http Session Clustering- serialization error
                    Julian Gosnell Expert

                    aswell as the jbossweb.sar, you should replace the jbossweb-ejb.jar from all/