Alternatively you could disable session serialization completely by adding the following line to your tomcat application xml:
<Manager pathname=""/> Only if you're not bothered about retrieving the sessions on restart of course --- On Fri, 20/3/09, Kengkaj Sathianpantarit <kengka...@gmail.com> wrote: > From: Kengkaj Sathianpantarit <kengka...@gmail.com> > Subject: Re: "Cannot serialize session attribute ..." > To: user-java@ibatis.apache.org > Date: Friday, 20 March, 2009, 11:18 AM > Mark transient in declaration - > transient StandardDaoManager standardDaoManager; > > Kengkaj > > On Fri, Mar 20, 2009 at 6:13 PM, > Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2 > <jonathan.leffingwell....@navy.mil> > wrote: > > What does that mean, "set > reference to it transient"? > > > > > > -----Original Message----- > > From: Nicholoz Koka Kiknadze [mailto:kikna...@gmail.com] > > Sent: Thursday, March 19, 2009 3:30 PM > > To: user-java@ibatis.apache.org > > Subject: Re: "Cannot serialize session attribute > ..." > > > > My first thought is that maybe StandardDaoManager can not > be serializable as > > it deals with database connections. Maybe makes sense to > set reference to it > > transient? > > > > > > > > > > > > > > > > On Thu, Mar 19, 2009 at 2:55 PM, Leffingwell, Jonathan R > CTR FRCSE, JAX > > 7.2.2 <jonathan.leffingwell....@navy.mil> > wrote: > > > > > > I am running a web app in IBM RAD 7 with a > Tomcat 5.5.26 server, > > with > > clustering (two Tomcat instances). When > shutting down the Tomcat > > server(s), > > I get the following warning: > > > > Mar 19, 2009 2:52:43 PM > org.apache.catalina.session.StandardSession > > writeObject > > WARNING: Cannot serialize session attribute > createXXXManager for > > session > > 8B1876E5C5C54B242E4256674843600B > > java.io.NotSerializableException: > > com.ibatis.dao.engine.impl.StandardDaoManager > > at > > > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081) > > at > > > > java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375) > > at > > > > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347) > > at > > > > java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290) > > at > > > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079) > > at > > > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302) > > at > > > > org.apache.catalina.session.StandardSession.writeObject(StandardSession.java > > :1478) > > at > > > > org.apache.catalina.session.StandardSession.writeObjectData(StandardSession. > > java:948) > > at > > > > org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:51 > > 7) > > at > > > > org.apache.catalina.session.StandardManager.unload(StandardManager.java:463) > > at > > > > org.apache.catalina.session.StandardManager.stop(StandardManager.java:667) > > at > > > > org.apache.catalina.core.StandardContext.stop(StandardContext.java:4360) > > at > > > org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1067) > > at > > > org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1067) > > at > > > > org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448) > > at > > > > org.apache.catalina.core.StandardService.stop(StandardService.java:510) > > at > > > > org.apache.catalina.core.StandardServer.stop(StandardServer.java:734) > > at > > org.apache.catalina.startup.Catalina.stop(Catalina.java:602) > > at > > org.apache.catalina.startup.Catalina.start(Catalina.java:577) > > 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:585) > > at > > org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) > > at > > org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) > > > > > > All of my managers, including createXXXManager, > inherit from a > > serializable > > class BaseManager, but if I'm reading this > correctly, it looks like > > the > > iBatis class StandardDaoManager is not > serializable. I can't edit > > that > > class, of course. > > > > Here's what I want to know: > > > > 1. If I put the following code in my > context.xml file, will it > > prevent > > clustering from working properly? > > > > <Manager > className="org.apache.catalina.session.PersistentManager" > > saveOnRestart="false" /> > > > > > > 2. If the aforementioned context.xml snippet > keeps clustering from > > working, > > what options do I have to stop the warnings but > keep clustering > > working > > properly? > > > > > > Thanks for any insight! > > > > Jonathan > > > > > > > > > >