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



      1. Update your [TOMCAT_HOME]/webapps/ROOT/WEB-INF/web.xml to make sessions time out in 1 minute
      2. Set the following in your portal-ext.properties to extend sessions automatically:
      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.


        Issue Links



              yvonne.han Yvonne Han
              gergely.mathe Gergely Mathe (Inactive)
              Kiyoshi Lee Kiyoshi Lee
              0 Vote for this issue
              1 Start watching this issue


                7 years, 31 weeks, 1 day ago


                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 M5