Pluto
  1. Pluto
  2. PLUTO-488

When executing doAction/doRender/doLoad/doAdmin and retrieving the servlet context of the portlet app fails, a generic NullPointerException is thrown

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.1.5, 2.0.0
    • Fix Version/s: 1.1.6, 2.0.0
    • Component/s: portlet container
    • Labels:
      None
    • Environment:
      Tomcat 5.5.26

      Description

      A very common error when working with JSR-168 portlets for the first time is when the servlet context of the portlet app cannot be accessed by the portal app. This is usually due to an app server misconfiguration (ex: forgetting to set crossContext="true" on Tomcat) or a failed deployment of the portlet app.

      On Pluto 1.1.5, when trying to render a portlet and the servlet context of the portlet app cannot be retrieved, a generic NullPointerException is thrown from DefaultPortletInvokerService.invoke (line 151). It would be much better to throw a PortletContainerException with a detailed message of the problem.

      This is actually already implemented in PortletContainerImpl.getPortletApplicationDescriptor (line 387), but the same logic is not used in the doRender, doAction, doLoad, and doAdmin methods of PortletContainerImpl. This code could be pulled out into a private method on PortletContainerImpl, or it could be placed directly into PortletContextManager.getPortletContext(ServletContext, String).

      1. P488-trunk-Rev670645.diff
        4 kB
        Nikita Dubrovsky
      2. P488-1.1.x-Rev656347.diff
        5 kB
        Nikita Dubrovsky

        Activity

        Nikita Dubrovsky created issue -
        Nikita Dubrovsky made changes -
        Field Original Value New Value
        Attachment P488-1.1.x-Rev656347.diff [ 12382132 ]
        Nikita Dubrovsky made changes -
        Fix Version/s 1.1.6 [ 12313075 ]
        Craig Doremus made changes -
        Fix Version/s 2.0.0 [ 12312914 ]
        Craig Doremus made changes -
        Affects Version/s 2.0.0 [ 12312914 ]
        Affects Version/s 1.1.5 [ 12312652 ]
        Fix Version/s 1.1.6 [ 12313075 ]
        Nikita Dubrovsky made changes -
        Fix Version/s 1.1.6 [ 12313075 ]
        Affects Version/s 1.1.5 [ 12312652 ]
        Nikita Dubrovsky made changes -
        Attachment P488-trunk-Rev670645.diff [ 12384509 ]
        Craig Doremus made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Mark Thomas made changes -
        Workflow jira [ 12431163 ] Default workflow, editable Closed status [ 12564747 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12564747 ] jira [ 12585979 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Nikita Dubrovsky
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development