You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by "Nils-Helge Garli (JIRA)" <ji...@apache.org> on 2008/01/10 14:53:34 UTC

[jira] Created: (PLUTO-463) java.lang.ClassCastException: org.apache.pluto.internal.impl.PortletSessionImpl with Pluto 2.0 and Jetty

java.lang.ClassCastException: org.apache.pluto.internal.impl.PortletSessionImpl with Pluto 2.0 and Jetty
--------------------------------------------------------------------------------------------------------

                 Key: PLUTO-463
                 URL: https://issues.apache.org/jira/browse/PLUTO-463
             Project: Pluto
          Issue Type: Bug
          Components: portlet container
    Affects Versions: 2.0.0
         Environment: Pluto 2.0 trunk, Jetty 6.1.7, jdk 1.5.0_14
            Reporter: Nils-Helge Garli


I'm trying to create an embedded version of pluto 2.0 using Jetty, and I've encountered this error:

java.lang.ClassCastException: org.apache.pluto.internal.impl.PortletSessionImpl
	at org.mortbay.jetty.servlet.AbstractSessionManager.access(AbstractSessionManager.java:106)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:162)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
	at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:192)
	at org.apache.pluto.internal.impl.PortletRequestDispatcherImpl.internalInclude(PortletRequestDispatcherImpl.java:178)
	at org.apache.pluto.internal.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:127)

The same setup used to work with pluto 1.1.4, and it appears that a change in org.apache.pluto.internal.impl.PortletRequestImpl is the reason for the error. In 1.1.4, the method getHttpSession() was not overridden, but in 2.0 it is overriden like this:

@Override
public HttpSession getSession() {
	if (isIncluded() || isForwarded()){
		PortletSession session = getPortletSession();
		return (HttpSession)session;
	}
	return super.getSession();
}

And aparently, the HttpSession instance that is returned by getPortletSession() is not compatible with the internal HttpSession type that Jetty expects (org.mortbay.jetty.servlet.AbstractSessionManager.access(AbstractSessionManager.java:106). 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (PLUTO-463) java.lang.ClassCastException: org.apache.pluto.internal.impl.PortletSessionImpl with Pluto 2.0 and Jetty

Posted by "Ate Douma (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PLUTO-463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ate Douma resolved PLUTO-463.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0

PortletSession no longer implements ServletSession

> java.lang.ClassCastException: org.apache.pluto.internal.impl.PortletSessionImpl with Pluto 2.0 and Jetty
> --------------------------------------------------------------------------------------------------------
>
>                 Key: PLUTO-463
>                 URL: https://issues.apache.org/jira/browse/PLUTO-463
>             Project: Pluto
>          Issue Type: Bug
>          Components: portlet container
>    Affects Versions: 2.0.0
>         Environment: Pluto 2.0 trunk, Jetty 6.1.7, jdk 1.5.0_14
>            Reporter: Nils-Helge Garli
>             Fix For: 2.0.0
>
>
> I'm trying to create an embedded version of pluto 2.0 using Jetty, and I've encountered this error:
> java.lang.ClassCastException: org.apache.pluto.internal.impl.PortletSessionImpl
> 	at org.mortbay.jetty.servlet.AbstractSessionManager.access(AbstractSessionManager.java:106)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:162)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> 	at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:192)
> 	at org.apache.pluto.internal.impl.PortletRequestDispatcherImpl.internalInclude(PortletRequestDispatcherImpl.java:178)
> 	at org.apache.pluto.internal.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:127)
> The same setup used to work with pluto 1.1.4, and it appears that a change in org.apache.pluto.internal.impl.PortletRequestImpl is the reason for the error. In 1.1.4, the method getHttpSession() was not overridden, but in 2.0 it is overriden like this:
> @Override
> public HttpSession getSession() {
> 	if (isIncluded() || isForwarded()){
> 		PortletSession session = getPortletSession();
> 		return (HttpSession)session;
> 	}
> 	return super.getSession();
> }
> And aparently, the HttpSession instance that is returned by getPortletSession() is not compatible with the internal HttpSession type that Jetty expects (org.mortbay.jetty.servlet.AbstractSessionManager.access(AbstractSessionManager.java:106). 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.