Where is this class com.formos.toolkit.data.IPersis located? Is it in the WEB-INF/classes directory? or in a JAR? I guess I would want to first make sure the webapp classloaded loaded it up first.
On 3/1/07, ddigmann <[EMAIL PROTECTED]> wrote:
A note before I start: I have found quite a few people out there asking about this same question but have not found my solution. This might mean I have trouble with finding the correct search terms or something entirely different. The ultimate issue is that from time to time Tomcat (we are using v 5.0.28 ) throws an exception while starting which we think causes sessions to be lost for our various users every time we research Tomcat. This is an issue since we would like the users to not loose data and be required to restart whenever we need to restart the system. The exception is as follows: INFO: Starting Servlet Engine: Apache Tomcat/5.0.28 Mar 1, 2007 4:35:23 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Mar 1, 2007 4:35:24 PM org.apache.catalina.session.StandardManager doLoad SEVERE: ClassNotFoundException while loading persisted sessions: java.lang.ClassNotFoundException: com.formos.toolkit.data.IPersistentDO java.lang.ClassNotFoundException: com.formos.toolkit.data.IPersistentDO at org.apache.catalina.loader.StandardClassLoader.loadClass( StandardClassLoader.java:854) at org.apache.catalina.loader.StandardClassLoader.loadClass( StandardClassLoader.java:721) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at java.io.ObjectInputStream.resolveProxyClass(ObjectInputStream.java:646) at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1494) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1457) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java :339) at org.apache.catalina.session.StandardSession.readObject( StandardSession.java:1342) at org.apache.catalina.session.StandardSession.readObjectData( StandardSession.java:885) at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java :416) at org.apache.catalina.session.StandardManager.load(StandardManager.java:343) at org.apache.catalina.session.StandardManager.start(StandardManager.java :657) at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:499) at org.apache.catalina.startup.ContextConfig.managerConfig(ContextConfig.java :315) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:635) at org.apache.catalina.startup.ContextConfig.lifecycleEvent( ContextConfig.java:216) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent( LifecycleSupport.java:119) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4290) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) at org.apache.catalina.core.StandardHost.start(StandardHost.java:789) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478) at org.apache.catalina.core.StandardService.start(StandardService.java:480) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) 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:287) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425) Mar 1, 2007 4:35:25 PM org.apache.catalina.session.StandardManager start SEVERE: Exception loading sessions from persistent storage java.lang.ClassNotFoundException: com.formos.toolkit.data.IPersistentDO at org.apache.catalina.loader.StandardClassLoader.loadClass( StandardClassLoader.java:854) at org.apache.catalina.loader.StandardClassLoader.loadClass( StandardClassLoader.java:721) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at java.io.ObjectInputStream.resolveProxyClass(ObjectInputStream.java:646) at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1494) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1457) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java :339) at org.apache.catalina.session.StandardSession.readObject( StandardSession.java:1342) at org.apache.catalina.session.StandardSession.readObjectData( StandardSession.java:885) at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java :416) at org.apache.catalina.session.StandardManager.load(StandardManager.java:343) at org.apache.catalina.session.StandardManager.start(StandardManager.java :657) at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:499) at org.apache.catalina.startup.ContextConfig.managerConfig(ContextConfig.java :315) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:635) at org.apache.catalina.startup.ContextConfig.lifecycleEvent( ContextConfig.java:216) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent( LifecycleSupport.java:119) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4290) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) at org.apache.catalina.core.StandardHost.start(StandardHost.java:789) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478) at org.apache.catalina.core.StandardService.start(StandardService.java:480) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) 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:287) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425) I have been given the task to fix this and have come across the magical world of <Context> and <Manager> which is where I think the solution lies. Prior to any work on this task our <Context> in server.xml was as follows: <Context path="/thisPath" reloadable="true" docBase="C:\devel\java\thisPath\context"/> This method as I understand it will default to the Standard Manager Implementation as described here: http://tomcat.apache.org/tomcat-5.0-doc/config/manager.html This method saves sessions but not in a manner of saving them once Tomcat has been restarted. The Persistent Manager Implementation sounds more like what I need to partake in. So I updated my server.xml to handle such a method. It now looks like this in the <Context>: <Context path="/thisPath" reloadable="true" docBase="C:\devel\java\thisPath\context"> <Manager className="org.apache.catalina.session.PersistentManager" saveOnRestart="true"> <Store className="org.apache.catalina.session.FileStore"/> </Manager> </Context> This method should save the sessions in a manner of FileStore (to disk) after Tomcat has be restarted. Here is where my current problem is. I think the sessions are being written just fine when I stop Tomcat. When I restart it, the log seems just fine (no unusual messages). Then when I start reusing the app for a session that should be saved, I get this exception: INFO: Server startup in 6859 ms Mar 1, 2007 4:22:31 PM org.apache.catalina.session.PersistentManagerBase swapIn SEVERE: Error deserializing Session A9B8C8714E8DC421692B63CA531873AD: java.lang.ClassNotFoundException: com.formos.toolkit.data.IPersistentDO Mar 1, 2007 4:22:31 PM org.apache.coyote.tomcat5.CoyoteAdapter service SEVERE: An exception or error occurred in the container during the request processing java.lang.IllegalStateException: Error deserializing Session A9B8C8714E8DC421692B63CA531873AD: java.lang.ClassNotFoundException: com.formos.toolkit.data.IPersis tentDO at org.apache.catalina.session.PersistentManagerBase.swapIn( PersistentManagerBase.java:805) at org.apache.catalina.session.PersistentManagerBase.findSession( PersistentManagerBase.java:629) at org.apache.coyote.tomcat5.CoyoteRequest.doGetSession(CoyoteRequest.java :2252) at org.apache.coyote.tomcat5.CoyoteRequest.getSession(CoyoteRequest.java :2116) at org.apache.coyote.tomcat5.CoyoteRequestFacade.getSession( CoyoteRequestFacade.java:526) at org.apache.catalina.authenticator.AuthenticatorBase.getSession( AuthenticatorBase.java:692) at org.apache.catalina.authenticator.AuthenticatorBase.getSession( AuthenticatorBase.java:675) at org.apache.catalina.authenticator.AuthenticatorBase.invoke( AuthenticatorBase.java:423) at org.apache.catalina.core.StandardValveContext.invokeNext( StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java :520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :137) at org.apache.catalina.core.StandardValveContext.invokeNext( StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :118) at org.apache.catalina.core.StandardValveContext.invokeNext( StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java :520) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext( StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java :520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection (Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.java:683) at java.lang.Thread.run(Thread.java:595) I was wondering if I was on the right path or just way off. Either way, can anybody see what I am doing wrong here? I would really appreciate any feedback anybody could give me. Thank you for your time and energy. Dustin -- View this message in context: http://www.nabble.com/Tomcat-Persistent-Session-Issues-tf3330946.html#a9262012 Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]