users@glassfish.java.net

Re: clustering

From: Glenn Holmer <gholmer_at_weycogroup.com>
Date: Tue, 12 Feb 2013 16:26:35 -0600

On 02/12/2013 09:11 AM, Glenn Holmer wrote:
> We're trying to get clustering working, with load balancing provided by
> Apache mod_jk. I have the DAS one one machine, and two instances on two
> other separate machines. Our Postgres database is on the same machine as
> the DAS.
>
> These are the things we're currently having trouble with; can anybody help?

> 2) When I deploy, sometimes the app works, but more often than not, I
> get a lot of these two errors:
>
> Exception occurred in getSession
> java.io.StreamCorruptedException: unexpected end of block data
>
> java.lang.ClassCastException: cannot assign instance of java.lang.String
> to field java.util.Collections$SynchronizedCollection.c of type
> java.util.Collection in instance of java.util.Collections$SynchronizedList

I think it's because I was missing this in my glassfish-web.xml:

<session-config>
   <session-manager persistence-type="replicated">
     <manager-properties>
       <property name="relaxCacheVersionSemantics" value="true"/>
     </manager-properties>
   </session-manager>
</session-config>

-- 
Glenn Holmer
Weyco Group, Inc.
phone: 414-908-1809
fax: 414-908-1601