Expand my Community achievements bar.

SOLVED

page is not rendering with new custom template

Avatar

Level 2

Hi All,

I have created a new template and mapped to component.Component's jsp has code snippet to call service but after creating page with that template and when double clicking page a blank page is showing.

Can someone help me how to debug this issue and resolve it.

//

<!--
<%--

  Component Template Workflow  component.

  This is a component template workflow

--%>
<%@include file="/libs/foundation/global.jsp"%>
<%@taglib prefix="cq" uri="http://www.day.com/taglibs/cq/1.0" %>
<%@page import="com.invoke.workflow.*"%>
<%@page import="org.slf4j.*"%>
<h1>TemplatePDF Page</h1>
<%
//create a InvokeAEMWorkflow instance
Logger log = LoggerFactory.getLogger(InvokeAEMWorkflowImp.class);
InvokeAEMWorkflow wfService = sling.getService(InvokeAEMWorkflowImp.class);

if(wfService !=null)
{
    log.info("GOT WF SERVICE OBJECT");

}else{

    log.info("NO WF SERVICE OBJECT AVAILABLE");
}    

%>
<h2>About to invoke an AEM workflow using the AEM workflow APIs</h2>

<h3>AEM Workflow status: <%=wfService.startWorkflow("/etc/workflow/models/InvokeWorkflow/jcr:content/model","/content/sling5")%></h3>

Thanks,

Kishore

1 Accepted Solution

Avatar

Correct answer by
Level 8

I think you are going to have to give us a little more information than what you have provided. 

The first question is did you check error.log to see if there were any exceptions when you try to view the page? One guess is that you getting a compile error because log is probably already defined. If you are on a more recent version of AEM then /libs/foundation/global.jsp defines the a log object (actually the cq:defineObjects tag does). Most likely you are getting a compile time error because of the duplicate variable name. 

View solution in original post

2 Replies

Avatar

Correct answer by
Level 8

I think you are going to have to give us a little more information than what you have provided. 

The first question is did you check error.log to see if there were any exceptions when you try to view the page? One guess is that you getting a compile error because log is probably already defined. If you are on a more recent version of AEM then /libs/foundation/global.jsp defines the a log object (actually the cq:defineObjects tag does). Most likely you are getting a compile time error because of the duplicate variable name. 

Avatar

Level 9

orotas wrote...

I think you are going to have to give us a little more information than what you have provided. 

The first question is did you check error.log to see if there were any exceptions when you try to view the page? One guess is that you getting a compile error because log is probably already defined. If you are on a more recent version of AEM then /libs/foundation/global.jsp defines the a log object (actually the cq:defineObjects tag does). Most likely you are getting a compile time error because of the duplicate variable name. 

 

i am seeing below error when i try to view the page.

24.01.2015 22:05:35.072 *ERROR* [172.17.234.171 [1422158735066] GET /wcm_author/content/priceless/en-us/test1.html HTTP/1.1] org.apache.sling.servlets.get.impl.DefaultGetServlet No renderer for extension html, cannot render resource JcrNodeResource, type=apps/invokeworkflow/tempWFComponent, superType=null, path=/content/priceless/en-us/test1/jcr:content