Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 31562 invoked from network); 18 May 2006 15:03:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 May 2006 15:03:11 -0000 Received: (qmail 21304 invoked by uid 500); 18 May 2006 15:02:53 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 21257 invoked by uid 500); 18 May 2006 15:02:53 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 21232 invoked by uid 99); 18 May 2006 15:02:53 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 May 2006 08:02:53 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [62.193.197.55] (HELO ws55.amenworld.com) (62.193.197.55) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 18 May 2006 08:02:51 -0700 Received: (qmail 25049 invoked from network); 18 May 2006 14:56:03 -0000 Received: from a0017-1-82-245-4-180.fbx.proxad.net (HELO ?192.168.0.241?) (82.245.4.180) by ws55.amenworld.com with SMTP; 18 May 2006 14:56:03 -0000 Message-ID: <446C8C84.3000702@praud.com> Date: Thu, 18 May 2006 17:02:28 +0200 From: Jean-Christophe Praud Organization: Robert & Camborde User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@tomcat.apache.org Subject: ClassCastException on cluster deserialization Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi all, I'm setting up a Tomcat cluster on two servers, and I keep getting a ClassCastException on a session variable (GW). The server which handles the request works well, but the other one can't get the session data. Its GW object seems to be instantiated, valueBound(HttpSessionBindingEvent event) is called, the object is added to the session, then I get the Exception. I tried with Tomcat 5.5.16 and 5.5.17, with several replicationMode. My session variable com.package1.subpackage1.GW implements the Serializable interface and contains some classes which are also Serializable. I don't see any Exception from the writeObject or readObject methods on any server. My config : The Exception's log : 18 mai 2006 16:48:28 org.apache.catalina.cluster.session.DeltaSession setAttribute GRAVE: Session attribute event listener threw exception java.lang.ClassCastException: com.package1.subpackage1.GW at common.listeners.ClusterAppSessionListener.printSessionInfo(ClusterAppSessionListener.java:47) at common.listeners.ClusterAppSessionListener.attributeAdded(ClusterAppSessionListener.java:26) at org.apache.catalina.cluster.session.DeltaSession.setAttribute(DeltaSession.java:1310) at org.apache.catalina.cluster.session.DeltaRequest.execute(DeltaRequest.java:159) at org.apache.catalina.cluster.session.DeltaManager.handleSESSION_DELTA(DeltaManager.java:1565) at org.apache.catalina.cluster.session.DeltaManager.messageReceived(DeltaManager.java:1516) at org.apache.catalina.cluster.session.DeltaManager.messageDataReceived(DeltaManager.java:1268) at org.apache.catalina.cluster.session.ClusterSessionListener.messageReceived(ClusterSessionListener.java:85) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.receive(SimpleTcpCluster.java:1163) at org.apache.catalina.cluster.tcp.ClusterReceiverBase.messageDataReceived(ClusterReceiverBase.java:418) at org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:107) at org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpReplicationThread.java:138) at org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationThread.java:69) What did I miss ? Regards, -- Jean-Christophe Praud - http://shub-niggurath.com Conseil & D�veloppement Informatique http://www.praud.com Ph'nglui mglw'nafh Cthulhu n'gah Bill R'lyeh Wgah'nagl fhtagn! --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org