Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-54820

You see some warnings that "Unable to extend session" if you have Audience Targeting application deployed

    Details

      Description

      1. Update your [TOMCAT_HOME]/webapps/ROOT/WEB-INF/web.xml to make sessions time out in 1 minute
        <session-config>
        <session-timeout>1</session-timeout>
        </session-config>
        
      2. Set the following in your portal-ext.properties to extend sessions automatically:
        session.timeout.auto.extend=true
        
      3. Start the portal
      4. Install Audience Targeting application (e.g. using the Marketplace portlet on Control Panel)

      You will see the following warnings in every minute:

      14:57:30,430 WARN  [http-bio-8080-exec-10][extend_session_jsp:542] Unable to extend session for report-campaign-tracking-action
      14:57:30,435 WARN  [http-bio-8080-exec-10][extend_session_jsp:542] Unable to extend session for report-campaign-content
      14:57:30,438 WARN  [http-bio-8080-exec-10][extend_session_jsp:542] Unable to extend session for content-targeting-api
      14:57:30,440 WARN  [http-bio-8080-exec-10][extend_session_jsp:542] Unable to extend session for analytics-api
      14:57:30,443 WARN  [http-bio-8080-exec-10][extend_session_jsp:542] Unable to extend session for report-user-segment-content
      

      The servlet contexts of the above bundles don't return a request dispatcher object, which causes a NullPointerException in extend_session.jsp, and the code sends the warning to the log for any type of exceptions encountered.

      However, servlet contexts don't have to return a request dispatcher for every servlets, and if they don't, it's basically not an error, so it might not be something that the user should be warned about.

      See official Java documentation:

      https://docs.oracle.com/javaee/7/api/javax/servlet/ServletContext.html#getRequestDispatcher(java.lang.String) - note the sentence: This method returns null if the ServletContext cannot return a RequestDispatcher. The source code of our implementations of this interface in com.liferay.portal.apache.bridges.struts.LiferayServletContext and com.liferay.portal.http.service.internal.servlet.BundleServletContext also indicate that the method getRequestDispatcher can return null.

      https://docs.oracle.com/javaee/7/api/javax/servlet/RequestDispatcher.html#include(javax.servlet.ServletRequest, javax.servlet.ServletResponse) - the inlcude method that is used in extend_session.jsp can throw ServletExcption and IOException, and these are the ones that we might want to inform the user about.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                yvonne.han Yvonne Han
                Reporter:
                gergely.mathe Gergely Mathe (Inactive)
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 31 weeks, 3 days ago

                  Packages

                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 M5