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

Prevent any Portlet to remove the Context on which the liferay portal itself is running

    Details

    • Branch Version/s:
      6.1.x, 6.0.x
    • Backported to Branch:
      Committed
    • Fix Priority:
      5
    • Liferay Contributor's Agreement:
      Accept

      Description

      In our enviroment at some point in time after starting the server, Liferay fails to render pages with our custom them.
      Initially the page are rendered properly.

      In the stdout of Tomcat I notice errors from the ServletVelocityResourceListener for finding an included vm.
      We use the default bundle, so Liferay is bound to the ROOT-content and the specified file (/html/themes/_unstyled/templates/init.vm) is present in that context.
      The ServletVelocityResourceListener calls the VelocityContextPool to the the ServletContext for the path "", which returns null, causing the ServletVelocityResourceListener to fail finding the init.vm file.

      I can't determine yet why the VelocityContextPool would fail to lookup the ServietContext for "". When I connected a debugger to the ServletVelocityResourceListener and traced into the VelocityContextPool , I found that initially it does contain an entry with "" as the key.

      Logging:

      ERROR ServletVelocityResourceListener

      • SERVLET_CONTEXT/html/themes/_unstyled/templates/init.vm is not valid because does not map to a servlet context
        ERROR velocity
      • ResourceManager : unable to find resource 'SERVLET_CONTEXT/html/themes/_unstyled/templates/init.vm' in any resource loader.
        ERROR velocity
      • #parse(): cannot find template 'SERVLET_CONTEXT/html/themes/_unstyled/templates/init.vm',
        called at nedascoservicenet-theme_SERVLET_CONTEXT_/templates/portal_normal.vm[line 2, column 1]
        ERROR IncludeTag
      • Current URL /home generates exception: org.apache.velocity.exception.ResourceNotFoundException:
        Unable to find resource 'SERVLET_CONTEXT/html/themes/_unstyled/templates/init.vm'

      Content of the Map<String, ServletContext> _pool in the VelocityContextPool:
      {
      web-form-portlet=org.apache.catalina.core.ApplicationContextFacade@1c31971,
      sevencogs-theme=org.apache.catalina.core.ApplicationContextFacade@1bb54e0,
      rotating-visual-portlet=org.apache.catalina.core.ApplicationContextFacade@1c15cc3,
      =org.apache.catalina.core.ApplicationContextFacade@1da1a93,
      accountbeheer-portlet=org.apache.catalina.core.ApplicationContextFacade@1b10a2f,
      atpview-1.0.0-SNAPSHOT=org.apache.catalina.core.ApplicationContextFacade@13a804,
      prototype-portlets-1.0.0-M1-SNAPSHOT=org.apache.catalina.core.ApplicationContextFacade@7bcbc8,
      opensso-support-portlet=org.apache.catalina.core.ApplicationContextFacade@17ff230,
      nedascoservicenet-theme=org.apache.catalina.core.ApplicationContextFacade@143967
      }

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                25 Vote for this issue
                Watchers:
                22 Start watching this issue

                Dates

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