TitleClassCastException When Log Out
Date23-Jan-2007 16:42:55 EET
Version2.4.87
Submitter194.239.188.2
Bug criticalityBadBug
Browser versionMS IE 6.0
Bug statusClosedBug
PageProvider usedcom.ecyrd.jspwiki.providers.VersioningFileProvider
Servlet ContainerJetty 6.1.1
Operating SystemMS Win XP SP2
URLLogout.jsp
Java version1.5.0_02-b09

When selecting the Log Out function the following exception is thrown:

HTTP ERROR: 500
com.ecyrd.jspwiki.WikiSession
RequestURI=/myWiki/Logout.jsp

Caused by:
java.lang.ClassCastException: com.ecyrd.jspwiki.WikiSession
	at com.ecyrd.jspwiki.auth.SessionMonitor.find(SessionMonitor.java:122)
	at com.ecyrd.jspwiki.auth.SessionMonitor.sessionDestroyed(SessionMonitor.java:254)
	at org.mortbay.jetty.servlet.AbstractSessionManager.removeSession(AbstractSessionManager.java:586)
	at org.mortbay.jetty.servlet.AbstractSessionManager$Session.invalidate(AbstractSessionManager.java:814)
	at com.ecyrd.jspwiki.auth.AuthenticationManager.logout(AuthenticationManager.java:310)
	at org.apache.jsp.Logout_jsp._jspService(org.apache.jsp.Logout_jsp:51)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:464)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:358)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
	at com.ecyrd.jspwiki.ui.WikiServletFilter.doFilter(WikiServletFilter.java:99)
	at com.ecyrd.jspwiki.ui.WikiJSPFilter.doFilter(WikiJSPFilter.java:71)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
	at org.mortbay.jetty.Server.handle(Server.java:285)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

AndrewJaquith, this sounds like yours :-)

-- JanneJalkanen


I just had the very same Exception on 2.4.91 (with Tomcat) :

Jan 29, 2007 5:56:10 PM org.apache.catalina.session.StandardSession expire
SEVERE: Session event listener threw exception
java.lang.ClassCastException: com.ecyrd.jspwiki.WikiSession
        at com.ecyrd.jspwiki.auth.SessionMonitor.find(SessionMonitor.java:122)
        at com.ecyrd.jspwiki.auth.SessionMonitor.sessionDestroyed(SessionMonitor.java:254)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:702)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:660)
        at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1112)
        at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:150)
        at com.ecyrd.jspwiki.auth.AuthenticationManager.logout(AuthenticationManager.java:310)
        at org.apache.jsp.Logout_jsp._jspService(Logout_jsp.java:59)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:390)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
        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 com.ecyrd.jspwiki.ui.WikiServletFilter.doFilter(WikiServletFilter.java:99)
        at com.ecyrd.jspwiki.ui.WikiJSPFilter.doFilter(WikiJSPFilter.java:71)
        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:228)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:496)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
        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:686)
        at java.lang.Thread.run(Thread.java:595)

--HarryMetske, 29-Jan-2007

I also had the same exception while accessing the first page itself (http://<ip>:port/JSPWiki/Install.jsp) in the OC4J server (v 10.1.3.0.1)

java.lang.ClassCastException: com.ecyrd.jspwiki.WikiSession
	at com.ecyrd.jspwiki.auth.SessionMonitor.find(SessionMonitor.java:122)
	at com.ecyrd.jspwiki.WikiSession.getWikiSession(WikiSession.java:851)
	at com.ecyrd.jspwiki.WikiContext.<init>(WikiContext.java:211)
	at com.ecyrd.jspwiki.WikiEngine.createContext(WikiEngine.java:1922)
	at _Error._jspService(_Error.java:56)
	at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.1.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
	at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)
	at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)
	at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:287)
	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:50)
	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)
	at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)
	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:790)
	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:756)
	at _UserPreferences._jspService(_UserPreferences.java:145)
	at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.1.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
	at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:701)
	at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:405)
	at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)
	at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
	at com.ecyrd.jspwiki.ui.WikiServletFilter.doFilter(WikiServletFilter.java:99)
	at com.ecyrd.jspwiki.ui.WikiJSPFilter.doFilter(WikiJSPFilter.java:71)
	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
	at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
	at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
	at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
	at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
	at java.lang.Thread.run(Thread.java:595)
Prashant


Should be fixed in 2.4.93.

--JanneJalkanen, 23-Feb-2007


Release 2.4.100 is now the stable release, so upgrading to this would solve your problem.

--HarryMetske

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-10) was last changed on 24-Mar-2007 15:59 by HarryMetske