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

ServletVelocityResourceListener receives an error - _unstyled init.vm does not map to a servlet context

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Inactive
    • Affects Version/s: 6.0.6 GA
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      LR 6.0.3, Solaris 10, SPARC, Java 6, Tomcat 6 (Liferay CE Bundle) clustered, MySQL
    • Branch Version/s:
      6.0.x
    • Similar Issues:
      Show 5 results 

      Description

      We have set up a SPARC box with 2 separate tomcat instances (liferay bundle) clustered together. Everything was going good when all of the sudden we receive this error which renders the liferay setup unusable and thus has to be restarted:

      2010-08-20 04:02:39,902 <TP-Processor12> ERROR [ServletVelocityResourceListener:74] - SERVLET_CONTEXT/html/themes/_unstyled/templates/init.vm is not valid because does not map to a servlet context
      2010-08-20 04:02:39,913 <TP-Processor12> ERROR [velocity:151] - ResourceManager : unable to find resource 'SERVLET_CONTEXT/html/themes/_unstyled/templates/init.vm' in any resource loader.
      2010-08-20 04:02:39,922 <TP-Processor12> ERROR [velocity:151] - #parse(): cannot find template 'SERVLET_CONTEXT/html/themes/unstyled/templates/init.vm', called at seg-default-theme_SERVLET_CONTEXT/templa
      tes/portal_normal.vm[line 6, column 1]
      2010-08-20 04:02:39,931 <TP-Processor12> ERROR [IncludeTag:227] - Current URL /web/guest generates exception: Unable to find resource 'SERVLET_CONTEXT/html/themes/_unstyled/templates/init.vm'
      2010-08-20 04:02:39,952 <TP-Processor12> 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 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:155)
      at com.liferay.portal.velocity.VelocityEngineImpl.mergeTemplate(VelocityEngineImpl.java:165)
      at com.liferay.portal.kernel.velocity.VelocityEngineUtil.mergeTemplate(VelocityEngineUtil.java:71)
      at com.liferay.taglib.util.ThemeUtil.includeVM(ThemeUtil.java:316)
      at com.liferay.taglib.util.ThemeUtil.include(ThemeUtil.java:72)
      at com.liferay.taglib.theme.IncludeTag.include(IncludeTag.java:38)
      at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:219)
      at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:58)
      at org.apache.jsp.html.common.themes.portal_jsp._jspx_meth_liferay_002dtheme_005finclude_005f1(portal_jsp.java:823)
      at org.apache.jsp.html.common.themes.portal_jsp._jspx_meth_c_005fotherwise_005f0(portal_jsp.java:795)
      at org.apache.jsp.html.common.themes.portal_jsp._jspService(portal_jsp.java:731)

      Could anyone shed some light on this issue? A work around?

      Thanks.

        Activity

        Hide
        neelam bhandari added a comment -

        I am facing this similar issue .Any solution yet ?

        Show
        neelam bhandari added a comment - I am facing this similar issue .Any solution yet ?
        Hide
        Josh Hibschman added a comment -

        Over a year after this ticket opened, we're still facing this issue. Any thoughts would be appreciated.

        Show
        Josh Hibschman added a comment - Over a year after this ticket opened, we're still facing this issue. Any thoughts would be appreciated.
        Hide
        Josh Hibschman added a comment -

        This workaround was successful for me (we have a gradle/ant process that wars and deploys the template):

        • Clean out your server:
          rm -rf liferay-portal-6.0-ee-sp1/tomcat-6.0.29/webapps/YOUR_WEBAPPS;
          rm -rf liferay-portal-6.0-ee-sp1/deploy/*;
          rm -rf liferay-portal-6.0-ee-sp1/tomcat-6.0.29/temp/*;
          rm -rf liferay-portal-6.0-ee-sp1/tomcat-6.0.29/work/Catalina/localhost/YOUR_WEBAPPS;
        • Startup your server (you will see the theme not found message)
        • War up and deploy your template, portlets, webapps, hit your website and make sure things look good
        • Shut down server
        • Restart server (this time it should see your template and load it)
        • Rebuild and deploy your template war and hit the site
        • Redeploy and verify you are not receiving init.vm missing message
        Show
        Josh Hibschman added a comment - This workaround was successful for me (we have a gradle/ant process that wars and deploys the template): Clean out your server: rm -rf liferay-portal-6.0-ee-sp1/tomcat-6.0.29/webapps/YOUR_WEBAPPS; rm -rf liferay-portal-6.0-ee-sp1/deploy/*; rm -rf liferay-portal-6.0-ee-sp1/tomcat-6.0.29/temp/*; rm -rf liferay-portal-6.0-ee-sp1/tomcat-6.0.29/work/Catalina/localhost/YOUR_WEBAPPS; Startup your server (you will see the theme not found message) War up and deploy your template, portlets, webapps, hit your website and make sure things look good Shut down server Restart server (this time it should see your template and load it) Rebuild and deploy your template war and hit the site Redeploy and verify you are not receiving init.vm missing message
        Hide
        Josh Hibschman added a comment -

        Further, it seems that problem only manifests if the server starts up and can't find your template. Subsequent startups after Tomcat has the template will not manifest the problem.

        Show
        Josh Hibschman added a comment - Further, it seems that problem only manifests if the server starts up and can't find your template. Subsequent startups after Tomcat has the template will not manifest the problem.
        Hide
        Edward Gonzales added a comment -

        Hello! We are in the process of removing the "General" component all together. Please help us by removing "General" from the component field and applying a relevant component. Thanks in advance for your help. formercomponentgeneral03202013EG

        Show
        Edward Gonzales added a comment - Hello! We are in the process of removing the "General" component all together. Please help us by removing "General" from the component field and applying a relevant component. Thanks in advance for your help. formercomponentgeneral03202013EG

          People

          • Votes:
            28 Vote for this issue
            Watchers:
            26 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              2 years, 19 weeks, 5 days ago

              Development

                Structure Helper Panel