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

Updating Velocity Engine settings can cause cause all portlets to no longer render

Description

    Steps to Reproduce:

    1. Navigate to Control Panel -> System Settings -> Template Engines -> Velocity Engine
    2. Click "Save" (Will redirect to blank page due to LPS-123755)
    3. Refresh the page
    4. Click "Update"
    5. Repeat steps 3 and 4 up to 50 times

    Expected Result:
    Updating Velocity settings never breaks portal.

    Actual Result:
    Update Velocity settings can sometimes cause error and all portlets will stop rendering in Portal.

    After seeing this error, attempt to navigate to any portlet.

     [error] "" does not match format "className#methodName"
     [error] Velocimacro : Velocimacro : Error using VM library : com.liferay.portal.template.velocity_6.0.0_CLASS_LOADER_CONTEXT_
    Unable to find Velocity template with ID com.liferay.portal.template.velocity_6.0.0_CLASS_LOADER_CONTEXT_
    org.apache.velocity.exception.ResourceNotFoundException: Unable to find Velocity template with ID com.liferay.portal.template.velocity_6.0.0_CLASS_LOADER_CONTEXT_
            at com.liferay.portal.template.velocity.internal.LiferayResourceManager.getResource(LiferayResourceManager.java:86)
            at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1400)
            at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1380)
            at org.apache.velocity.runtime.VelocimacroFactory.initVelocimacro(VelocimacroFactory.java:202)
            at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:261)
            at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:107)
            at com.liferay.portal.template.velocity.internal.VelocityManager.init(VelocityManager.java:244)
            at com.liferay.portal.kernel.template.TemplateManagerUtil$TemplateManagerServiceTrackerCustomizer.addingService(TemplateManagerUtil.java:240)
            at com.liferay.portal.kernel.template.TemplateManagerUtil$TemplateManagerServiceTrackerCustomizer.modifiedService(TemplateManagerUtil.java:264)
            at com.liferay.portal.kernel.template.TemplateManagerUtil$TemplateManagerServiceTrackerCustomizer.modifiedService(TemplateManagerUtil.java:227)
            at com.liferay.registry.internal.ServiceTrackerCustomizerAdapter.modifiedService(ServiceTrackerCustomizerAdapter.java:43)
            at org.osgi.util.tracker.ServiceTracker$Tracked.customizerModified(ServiceTracker.java:956)
            at org.osgi.util.tracker.ServiceTracker$Tracked.customizerModified(ServiceTracker.java:1)
            at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
            at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:903)
            at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
            at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
            at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
            at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.setProperties(ServiceRegistrationImpl.java:168)
            at org.apache.felix.scr.impl.manager.SingleComponentManager.updateServiceRegistration(SingleComponentManager.java:623)
            at org.apache.felix.scr.impl.manager.SingleComponentManager.modify(SingleComponentManager.java:820)
            at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:710)
            at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:674)
            at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:435)        at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:317)
            at org.apache.felix.scr.impl.manager.RegionConfigurationSupport$2.configurationEvent(RegionConfigurationSupport.java:119)
            at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:1685)
            at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1637)
            at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138)
            at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105)
            at java.lang.Thread.run(Thread.java:748)
    

    Portlet render error:

    ERROR [http-nio-8080-exec-6][IncludeTag:128] Current URL /group/control_panel/manage?p_p_id=com_liferay_configuration_admin_web_portlet_SystemSettingsPortlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_com_liferay_configuration_admin_web_portlet_SystemSettingsPortlet_mvcRenderCommandName=%2Fconfiguration_admin%2Fedit_configuration&_com_liferay_configuration_admin_web_portlet_SystemSettingsPortlet_factoryPid=com.liferay.portal.template.velocity.configuration.VelocityEngineConfiguration&_com_liferay_configuration_admin_web_portlet_SystemSettingsPortlet_pid=com.liferay.portal.template.velocity.configuration.VelocityEngineConfiguration generates exception: java.lang.NullPointerException
    java.lang.NullPointerException
            at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.doProcessTemplate(RuntimePageImpl.java:397)
            at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.doDispatch(RuntimePageImpl.java:327)
            at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.getProcessedTemplate(RuntimePageImpl.java:78)
            at com.liferay.portal.kernel.layoutconfiguration.util.RuntimePageUtil.getProcessedTemplate(RuntimePageUtil.java:37)
            at com.liferay.application.list.taglib.display.context.logic.PanelAppContentHelper.writeContent(PanelAppContentHelper.java:86)
            at org.apache.jsp.application_005fcontent.page_jsp._jspService(page_jsp.java:161)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
            at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:368)
            at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:380)
            at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
            at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
            at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:120)
            at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
            at com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:67)
            at com.liferay.portal.servlet.DirectRequestDispatcherFactoryImpl$IndirectRequestDispatcher.include(DirectRequestDispatcherFactoryImpl.java:190)
    

    Reproduced on:
    Master: ac943b75cd01349940708537db6edd0dfa538ca8
    DXP 7.3.10
    DXP 7.2.10.2

    Not Reproducible on:
    DXP 7.1.10.4

    Attachments

      Issue Links

        Activity

          People

            support-lep@liferay.com SE Support
            victor.ware Victor Ware
            Felipe Lins Felipe Lins
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              2 years, 1 week, 5 days ago

              Packages

                Version Package