PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-16479

CLONE - Plugins need to be deployed twice after recompile / restart

    Details

    • Similar Issues:
      Show 5 results 

      Description

      Every day I update from trunk and recompile using ant all. This cleans out my Tomcat installation of everything Liferay, including plugins. After starting Liferay, I then deploy the plugins I'm working on.

      After this deploy, portlet plugins show up normally, but as soon as you click on a button or anything in them, the following exception is thrown:

      15:09:36,656 ERROR [jsp:157] java.lang.ClassNotFoundException: com.inkwell.internet.productregistration.registration.portlet.ProductRegistrationPortlet
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
      at com.liferay.portal.kernel.util.MethodCache._get(MethodCache.java:106)
      at com.liferay.portal.kernel.util.MethodCache.get(MethodCache.java:64)
      at com.liferay.portal.kernel.util.MethodCache.get(MethodCache.java:58)
      at com.liferay.portal.kernel.portlet.LiferayPortlet.callActionMethod(LiferayPortlet.java:135)
      at com.liferay.util.bridges.mvc.MVCPortlet.callActionMethod(MVCPortlet.java:223)
      at com.liferay.portal.kernel.portlet.LiferayPortlet.processAction(LiferayPortlet.java:70)
      at com.liferay.util.bridges.mvc.MVCPortlet.processAction(MVCPortlet.java:195)
      at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:72)
      at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:50)
      at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:639)
      at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:672)
      at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:361)
      at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:738)
      at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:548)
      at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:217)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
      at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:154)

      After this, I redeploy the portlet, and everything works normally.

      For themes, it's a similar issue but slightly different. When the theme is first deployed, it works fine. Then I get the above error with a portlet and redeploy the portlet. After I've redeployed the portlet, the theme becomes unavailable and Liferay displays an empty page and throws the following exception:

      15:10:19,644 ERROR [ServletVelocityResourceListener:77] SERVLET_CONTEXT/html/themes/_unstyled/templates/init.vm is not valid because does not map to a servlet context
      15:10:19,646 ERROR [velocity:151] ResourceManager : unable to find resource 'SERVLET_CONTEXT/html/themes/_unstyled/templates/init.vm' in any resource loader.
      15:10:19,647 ERROR [velocity:151] #parse(): cannot find template 'SERVLET_CONTEXT/html/themes/unstyled/templates/init.vm', called at inkwell-internet-theme_SERVLET_CONTEXT/templates/portal_normal.vm[line 3, column 1]
      15:10:19,647 ERROR [IncludeTag:229] Current URL /web/guest/home?p_auth=bO4yYXfh&p_p_auth=DZW2oGgY&p_p_id=productregistration_WAR_productregistrationportlet_INSTANCE_mWD5&p_p_lifecycle=1&p_p_state=maximized&p_p_mode=view&p_p_col_id=column-2&p_p_col_pos=1&p_p_col_count=2&productregistration_WAR_productregistrationportlet_INSTANCE_mWD5_javax.portlet.action=addRegistration generates exception: Unable to find resource '_SERVLET_CONTEXT/html/themes/_unstyled/templates/init.vm'
      15:10:19,649 ERROR [IncludeTag:157] org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'SERVLET_CONTEXT/html/themes/_unstyled/templates/init.vm'
      at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:483)
      at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:354)
      at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1400)
      at org.apache.velocity.runtime.directive.Parse.render(Parse.java:198)
      at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
      at org.apache.velocity.Template.merge(Template.java:328)
      at org.apache.velocity.Template.merge(Template.java:235)
      at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:381)
      at com.liferay.portal.velocity.VelocityEngineImpl.mergeTemplate(VelocityEngineImpl.java:157)
      at com.liferay.portal.velocity.VelocityEngineImpl.mergeTemplate(VelocityEngineImpl.java:167)
      at com.liferay.portal.kernel.velocity.VelocityEngineUtil.mergeTemplate(VelocityEngineUtil.java:73)
      at com.liferay.taglib.util.ThemeUtil.includeVM(ThemeUtil.java:317)
      at com.liferay.taglib.util.ThemeUtil.include(ThemeUtil.java:74)
      at com.liferay.taglib.theme.IncludeTag.include(IncludeTag.java:40)
      at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:221)
      at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:60)
      at org.apache.jsp.html.common.themes.portal_jsp._jspx_meth_liferay_002dtheme_005finclude_005f1(portal_jsp.java:828)
      at org.apache.jsp.html.common.themes.portal_jsp._jspx_meth_c_005fotherwise_005f0(portal_jsp.java:800)
      at org.apache.jsp.html.common.themes.portal_jsp._jspService(portal_jsp.java:736)

      After redeploying the theme, everything works properly.

      So it seems that upon restarting Liferay, plugins need to be deployed twice, which is not expected behavior.

        Activity

        Hide
        frinux added a comment -

        Cloned LPS-9618: this issue has not been corrected, I still experience it.

        Show
        frinux added a comment - Cloned LPS-9618 : this issue has not been corrected, I still experience it.
        Hide
        frinux added a comment -

        I'm also having this issue on 6.0.11 (EE).
        Here is how I reproduce it :

        • I deploy a custom theme
        • I change the value "default.regular.theme.id" in portal-ext.properties to match the custom theme
        • I refresh the page : OK, my new theme is used
        • I deploy a custom portlet (based on GenericPortlet, but I don't think this has something to do with the issue)
        • I refresh the page: an exception is thrown:

        08:43:18,685 ERROR [IncludeTag:154] org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'SERVLET_CONTEXT/html/themes/_unstyled/templates/init.vm'
        at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:483)
        at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:354)
        at com.liferay.portal.velocity.LiferayResourceManager.getResource(LiferayResourceManager.java:48)
        at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1400)
        at org.apache.velocity.runtime.directive.Parse.render(Parse.java:198)
        at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
        at org.apache.velocity.Template.merge(Template.java:328)
        at org.apache.velocity.Template.merge(Template.java:235)
        at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:381)
        at com.liferay.portal.velocity.VelocityEngineImpl.mergeTemplate(VelocityEngineImpl.java:166)
        at com.liferay.portal.velocity.VelocityEngineImpl.mergeTemplate(VelocityEngineImpl.java:176)
        at com.liferay.portal.kernel.velocity.VelocityEngineUtil.mergeTemplate(VelocityEngineUtil.java:71)
        at com.liferay.taglib.util.ThemeUtil.includeVM(ThemeUtil.java:330)
        at com.liferay.taglib.util.ThemeUtil.include(ThemeUtil.java:76)
        at com.liferay.taglib.theme.IncludeTag.include(IncludeTag.java:38)
        at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:326)
        at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:82)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

        I must restart the server to make it work.

        It is doing that each time a portlet is deployed... That's quite annoying

        Show
        frinux added a comment - I'm also having this issue on 6.0.11 (EE). Here is how I reproduce it : I deploy a custom theme I change the value "default.regular.theme.id" in portal-ext.properties to match the custom theme I refresh the page : OK, my new theme is used I deploy a custom portlet (based on GenericPortlet, but I don't think this has something to do with the issue) I refresh the page: an exception is thrown: 08:43:18,685 ERROR [IncludeTag:154] org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource ' SERVLET_CONTEXT /html/themes/_unstyled/templates/init.vm' at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:483) at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:354) at com.liferay.portal.velocity.LiferayResourceManager.getResource(LiferayResourceManager.java:48) at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1400) at org.apache.velocity.runtime.directive.Parse.render(Parse.java:198) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) at org.apache.velocity.Template.merge(Template.java:328) at org.apache.velocity.Template.merge(Template.java:235) at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:381) at com.liferay.portal.velocity.VelocityEngineImpl.mergeTemplate(VelocityEngineImpl.java:166) at com.liferay.portal.velocity.VelocityEngineImpl.mergeTemplate(VelocityEngineImpl.java:176) at com.liferay.portal.kernel.velocity.VelocityEngineUtil.mergeTemplate(VelocityEngineUtil.java:71) at com.liferay.taglib.util.ThemeUtil.includeVM(ThemeUtil.java:330) at com.liferay.taglib.util.ThemeUtil.include(ThemeUtil.java:76) at com.liferay.taglib.theme.IncludeTag.include(IncludeTag.java:38) at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:326) at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:82) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) I must restart the server to make it work. It is doing that each time a portlet is deployed... That's quite annoying
        Hide
        Douglas Wong added a comment -

        Hi frinux,

        Please see my comments on the original ticket: LPS-9618. The problem with this issue is that I cannot reproduce it. I've deployed many themes and portlets and have not experienced this exception. You mentioned that you are using a custom portlet and a custom theme, and my guess is that something is not correct in one of or both of those plugins.

        If you can demonstrate that the issue is with Liferay and not with your custom work, we can be more helpful in resolving the issue.

        Doug

        Show
        Douglas Wong added a comment - Hi frinux, Please see my comments on the original ticket: LPS-9618 . The problem with this issue is that I cannot reproduce it. I've deployed many themes and portlets and have not experienced this exception. You mentioned that you are using a custom portlet and a custom theme, and my guess is that something is not correct in one of or both of those plugins. If you can demonstrate that the issue is with Liferay and not with your custom work, we can be more helpful in resolving the issue. Doug
        Hide
        Douglas Wong added a comment - - edited

        I'm closing this issue for the time being. If you find you are able to duplicate this issue using Liferay plugins, feel free to reopen this issue and we'll find a resolution. Thanks!

        Show
        Douglas Wong added a comment - - edited I'm closing this issue for the time being. If you find you are able to duplicate this issue using Liferay plugins, feel free to reopen this issue and we'll find a resolution. Thanks!

          People

          • Assignee:
            Douglas Wong
            Reporter:
            frinux
            Recent user:
            Esther Sanz
            Participants of an Issue:
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 49 weeks, 2 days ago

              Development

                Structure Helper Panel