Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 5.2.3, 6.0.4 GA
    • Fix Version/s: None
    • Component/s: WCM
    • Labels:
      None
    • Similar Issues:
      Show 5 results 

      Description

      Direct access to portlet from browsercause NullPointerException.
      For example, You go to the following URL,

      http://www.liferay.com/wol-portlet/1/

      and Following stacktrace is visible in your browser. It is not good to reveal to users the details of error.

      java.lang.NullPointerException
      com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:80)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

      and same stacktrace is recorded in server.log.

      It seems that portletRequest variable is null in PortletServlet#service when direct access to portlet.
      and there is not null check for portletRequest, so PortletServlet throw NullPointerException.

      PortletRequest portletRequest = (PortletRequest)request.getAttribute(
      JavaConstants.JAVAX_PORTLET_REQUEST);
      ・・・
      LiferayPortletSession portletSession =
      (LiferayPortletSession)portletRequest.getPortletSession();

        Activity

        Hide
        Justin Choi added a comment -

        Hello.

        I am trying to replicate this error message and need clarification. I tried creating a portlet and then copying the URL to another browser and entering the URL directly. Is this what "Direct access to portlet" means?

        Show
        Justin Choi added a comment - Hello. I am trying to replicate this error message and need clarification. I tried creating a portlet and then copying the URL to another browser and entering the URL directly. Is this what "Direct access to portlet" means?
        Hide
        Michael Saechang added a comment -

        Due to inactivity.

        Show
        Michael Saechang added a comment - Due to inactivity.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              4 years, 12 weeks, 5 days ago

              Development

                Structure Helper Panel