Uploaded image for project: 'Pluto'
  1. Pluto
  2. PLUTO-463

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • portlet container
    • None
    • Pluto 2.0 trunk, Jetty 6.1.7, jdk 1.5.0_14

    Description

      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).

      Attachments

        Activity

          People

            Unassigned Unassigned
            nilsga Nils-Helge Garli
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: