All,

I have recently been testing my app with JBoss clustering, with the
hopes of achieving HTTP Session Replication.

For very simple cases (eg a String in the session), it works flawlessly
out of the box. However, with more complicated  objects in the session,
I am getting ClassCastExceptions as JBoss tries to deserialize the
session. The trace is pasted below.

Having looked at the code for
ClusteredHTTPSessionBeanImpl.unserializeSession() (the method is pasted
below), I can't figure out why it would be trying to cast to one of my
objects (specifically OrderedMap), nor why this exception was raised.

Does anyone have any idea:
- How deserialization works and why I would get a ClassCastException?
- What tests to run to figure out what's going on?
- Is there documentation or any other web discussion that covers this
process in detail? (I have searched this list)
- Is there an online resource discussing strategy for how complex or
deep objects in the session should be to make HTTP session replication
efficient?

Any help would be greatly appreciated.

thanks so much!
Chris



-------- ClusteredHTTPSessionBeanImpl.unserializeSession() ----------

   protected void unserializeSession() throws EJBException
   {
      try
      {
         MarshalledValue mo = (MarshalledValue)this.getSerializedSession
();
         if (mo != null)
            this.tmpSession = (SerializableHttpSession)(mo.get ());
      }
      catch (Exception e)
      {
         throw new EJBException (e.toString ());
      }
   }



-------- The stack trace --------------

17:49:04,096 INFO  [DefaultPartition] New cluster view (id: 2, delta:
-1) : [172.16.2.13:1099]
17:49:04,104 INFO  [DefaultPartition:ReplicantManager] Dead members: 1
17:49:17,478 INFO  [STDOUT] 2004.02.09-17:49:17 E=091025 L=DEBUG U=null
A=null SQL : : : SELECT * FROM TBLEFTREWARDSIMPORT WHERE SSTATUS =
Imported
17:49:19,337 INFO  [JkInputStream] Receiving: getting request body chunk
0 0
17:49:19,510 ERROR [LogInterceptor] EJBException:
javax.ejb.EJBException: java.lang.ClassCastException:
com.higherone.util.OrderedMap
        at
org.jboss.ha.httpsession.beanimpl.ejb.ClusteredHTTPSessionBeanImpl.unser
ializeSession(ClusteredHTTPSessionBeanImpl.java:128)
        at
org.jboss.ha.httpsession.beanimpl.ejb.ClusteredHTTPSessionBeanImpl.getSe
ssion(ClusteredHTTPSessionBeanImpl.java:71)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContaine
r.java:1095)
        at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySync
hronizationInterceptor.java:304)
        at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInt
erceptor.java:163)
        at
org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor
.java:89)
        at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
        at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryF
inderInterceptor.java:122)
        at
org.jboss.ha.httpsession.beanimpl.ejb.ServerTCLInterceptor.invoke(Server
TCLInterceptor.java:40)
        at
org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:490)
        at org.jboss.ejb.Container.invoke(Container.java:700)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDi
spatcher.java:284)
        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
        at
org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
        at
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:9
0)
        at
org.jboss.ha.httpsession.beanimpl.ejb.ClientTCLInterceptor.invoke(Client
TCLInterceptor.java:46)
        at
org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityInterceptor.java:97)
        at
org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
        at $Proxy35.getSession(Unknown Source)
        at
org.jboss.ha.httpsession.server.ClusteredHTTPSessionService.getHttpSessi
on(ClusteredHTTPSessionService.java:138)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDi
spatcher.java:284)
        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
        at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
        at $Proxy38.getHttpSession(Unknown Source)
        at
org.jboss.web.tomcat.session.ClusterManager.loadSession(ClusterManager.j
ava:595)
        at
org.jboss.web.tomcat.session.ClusterManager.findSession(ClusterManager.j
ava:273)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:173)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:171)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs
sociationValve.java:65)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577
)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
        at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:263)
        at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
        at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
        at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
562)
        at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:619)
        at java.lang.Thread.run(Thread.java:479)


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to