Yes, you were right. I realized there are two users were logon just before I 
restarted Tomcat. As a result, the browser were trying to load the old sessions 
from Tomcat.

Thanks for your help. 

Michael




----- Original Message ----
From: Johan Compagner <[EMAIL PROTECTED]>
To: users@wicket.apache.org
Sent: Saturday, July 19, 2008 4:57:40 AM
Subject: Re: Switching SecondLevelCacheSessionStore to HttpSessionStore throws 
ClassCastException

Are you sure you dont read in a serializef session from tomcat when
you are starting up?

If you use a new browser instance so that you really have a new
session do you still have this problem?

On 7/18/08, Michael K <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I encountered java.io.InvalidClassException when trying to change from
> default SecondLevelCacheSessionStore to HttpSessionStore.
>
> The exceptions are shown below:
>
> org.apache.wicket.protocol.http.HttpSessionStore cannot be cast to
> org.apache.wicket.protocol.http.SecondLevelCacheSessionStor
> e
> java.lang.ClassCastException:
> org.apache.wicket.protocol.http.HttpSessionStore cannot be cast to
> org.apache.wicket.protocol.ht
> tp.SecondLevelCacheSessionStore
>         at
> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.getStore(SecondLevelCacheSessi
> onStore.java:366)
>         at
> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionSto
> re.java:303)
>         at org.apache.wicket.Session.getPage(Session.java:751)
>         at
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:448)
>         at
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
>         at org.apache.wicket.RequestCycle.step(RequestCycle.java:1229)
>         at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1349)
>         at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
>         at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387)
>         at
> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at
> org.apache.cayenne.conf.WebApplicationContextFilter.doFilter(WebApplicationContextFilter.java:91)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>         at org.apaat
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
>         at
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
>         at
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
>         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
>         at
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
>         at
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
>         at java.lang.Thread.run(Thread.java:619)
> there was an error detaching the request from the session
> [EMAIL PROTECTED]
> java.lang.ClassCastException:
> org.apache.wicket.protocol.http.HttpSessionStore cannot be cast to
> org.apache.wicket.protocol.ht
> tp.SecondLevelCacheSessionStore
>         at
> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.getStore(SecondLevelCacheSessi
> onStore.java:366)
>         at
> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.put(SecondLevelCacheSessionSto
> re.java:332)
>         at org.apache.wicket.Session.requestDetached(Session.java:1370)
>         at org.apache.wicket.RequestCycle.detach(RequestCycle.java:1081)
>         at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1367)
>         at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
>         at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387)
>         at
> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at
> org.apache.cayenne.conf.WebApplicationContextFilter.doFilter(WebApplicationContextFilter.java:91)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> ......
> ---------------------------------------
>
>
> The code shown below:
>
> public class AtsApplication extends WebApplication {
>
>     public Class getHomePage() {
>         return LoginPage.class;
>     }
>
>     public Session newSession(Request request, Response response) {
>         return new AtsSigninSession(request);
>     }
>
>
>     protected ISessionStore newSessionStore() {
>         return new HttpSessionStore(this);
>     }
>
> }
>
> I am using Wicket 1.3.4 release.
>
> What am I missing here?
>
>
> Thanks in advance.
>
> Regards,
> Michael
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


      

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to