Jahia in English > JahiaTemplateServiceException

0 (0 Good)
0 (0 Bad)

JahiaTemplateServiceException

by  malta »  2011/06/07 18:44

Jahia_EE_v6_SP1_r28889.patch1

I created a new template tpl.simple2.jsp
- copying tpl.simple.jsp to tpl.simple2.jsp and
- registered simple2 in definitions.cnd
- registered simple2 in templates.xml

The new template worked: pages based on the new template are shown correctly!

Then I transferred my Jahia website to another host copying the complete Jahia directory to the new host and imported the complete Jahia database dump.

The site is working on the new host, but not the pages based on template simple2.

Why did it work before??

catalina.out shows:


2010-06-24 10:39:20,717: ERROR [ErrorLoggingFilter] - User message=Unable to find the template for page ID=1443, page definition ID=1436 and name 'simple2', System message=Una

ble to find the template for page ID=1443, page definition ID=1436 and name 'simple2'

org.jahia.exceptions.JahiaTemplateServiceException: User message=Unable to find the template for page ID=1443, page definition ID=1436 and name 'simple2', System message=Unabl

e to find the template for page ID=1443, page definition ID=1436 and name 'simple2'

at org.jahia.engines.core.Core_Engine.resolveJSPFullFileName(Core_Engine.java:245)

at org.jahia.engines.core.Core_Engine.processCore(Core_Engine.java:148)

...

  (malta)

Number of messages  19
Registration date
0 (0 Good)
0 (0 Bad)

Re: JahiaTemplateServiceException

by  malta »  2011/06/07 18:44

One other info:

The name of the new host for jahia has changed. There is a also a new IP addrees. May this be connected to the newly created template which could not be found?

When I do: Site administration - manage virtual websites - manage templates: the template path of the new template is empty. How can I set the template path in the databse? What table?

Thanx for any hint

  (malta)

Number of messages  19
Registration date
0 (0 Good)
0 (0 Bad)

Re: JahiaTemplateServiceException

by  fcantegrel »  2011/06/07 18:44

Hi,

Based only on the exception you posted, it seems that the template simple2 is not found in your Jahia (not declared at all).
1- when you said you copied the Jahia directory, is it the webapp or the whole server instance ?
2- Are you sure that the template deployed on the new server is the good one ?
3- Do you succeed to create new pages with the new template simple2 on this server ? If not, could you post or attach your template.xml file and also your definitions.cnd file ?

How Jahia works for the templates: It reads the content of the file template.xml and records each template (with its name) in the DB. So it is possible then to link a page to a template. It means that if the template has not been registered, there is something wrong in the template.xml, regarding the naming of the template or the path of the template file.

are there any other logs you could share ? are there template related warnings or errors at the startup of Jahia ?

Regards,
Fabrice.
  • Re: JahiaTemplateServiceException
    2011/06/07 18:44

    fcantegrel Hi,<br/><br/>Based only on the exception you posted, it seems that the template simple2 is not found in your Jahia (not declared at all).<br/>1- when you said you copied the Jahia directory, is it the webapp or the whole server instance ?<br/>2- Are you sure that the template deployed on the new server is the good one ?<br/>3- Do you succeed to create new pages with the new template simple2 on this server ? If not, could you post or attach your template.xml file and also your definitions.cnd file ?<br/><br/>How Jahia works for the templates: It reads the content of the file template.xml and records each template (with its name) in the DB. So it is possible then to link a page to a template. It means that if the template has not been registered, there is something wrong in the template.xml, regarding the naming of the template or the path of the template file.<br/><br/>are there any other logs you could share ? are there template related warnings or errors at the startup of Jahia ?<br/><br/>Regards,<br/>Fabrice.

  • Number of messages  9
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: JahiaTemplateServiceException

    by  malta »  2011/06/07 18:44

    jahia.log shows after start:

    2010-06-29 22:01:24,460: WARN [main] JahiaTemplateManagerService, org.jahia.services.templates.JahiaTemplateManagerService: Unable to lookup the source path for the template named 'simple2' in the site with ID=10
    2010-06-29 22:01:24,467: ERROR [main] PageDefinitionHelper, org.jahia.services.templates.PageDefinitionHelper: Unable to find template 'simple2' in the template set for site 'Malteser Sankt Ingbert'. There were already 1 page(s) created with this template. IDs: [1443]. This will cause an exception when one of these pages will be called.

    Error remains even if I give full path in templates.xml such as /templates/web_templates/tpl.simple2.jsp
    In templates administration there is no path for simple2 but for simple.

    All the following 3 files are in /usr/share/Jahia_EE_v6_SP1_r28889.patch1/webapps/ROOT/templates/web_templates

    web_templates is used as template set for the website.


    cat tpl.simple2.jsp
    /1])
    containerList maincontent (jnt:mainContentContainer)
    ...


    Thanks and regards
    Andreas

      (malta)

    Number of messages  19
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: JahiaTemplateServiceException

    by  wassek »  2011/06/07 18:44

    Hello,

    When you copy the jahia directory. Do you already had a running jahia on the destination?
    Maybe the timestamps of the definition files are to old. You should open your definitions.cnd and templates.xml and save it again that the timestamps get newer. After that the deployment of the template should work.

    When you copy a Jahia to another server you should delete the work folder of tomcat.

    best regards
    Werner

    Werner Assek (wassek)

    Number of messages  24
    Registration date
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page