AnsweredAssumed Answered

Alfresco 4.0.b on Win7 x64 share installation error

Question asked by unknown-user on Nov 4, 2011
Latest reply on Mar 20, 2013 by aitbenmouh
We install alfresco 4.0.b on Win 7 x64.
After installation we could connect alfresco with http://127.0.0.1:8080/alfresco/ .
However,we got error on share h(ttp://127.0.0.1:8080/share/).
When i tried to connect it connected to "http://127.0.0.1:8080/share/page/site-index" directly.
And got this error on screen

A problem has occurred.
This page could not be rendered:
slingshot-login
Please notify your system administrator.

Moreover share log file contains this exception

00:20:11,706 ERROR [org.springframework.extensions.surf.render.RenderService] An exception occurred while rendering: slingshot-login
org.springframework.extensions.surf.exception.RendererExecutionException: Cannot resolve template - may be missing from the definition: template-instance: slingshot-login, <?xml version="1.0" encoding="UTF-8"?>

<template-instance>
  <title>Slingshot Login Template</title> 
  <template-type>org/alfresco/global/slingshot-login</template-type>
</template-instance>

   at org.springframework.extensions.surf.render.RenderService.processTemplate(RenderService.java:698)
   at org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer.calculateComponentDependencies(TemplateInstanceRenderer.java:61)
   at org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer.body(TemplateInstanceRenderer.java:118)
   at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:77)
   at org.springframework.extensions.surf.render.bean.PageRenderer.body(PageRenderer.java:85)
   at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:77)
   at org.springframework.extensions.surf.render.RenderService.renderPage(RenderService.java:763)
   at org.springframework.extensions.surf.mvc.PageView.dispatchPage(PageView.java:419)
   at org.springframework.extensions.surf.mvc.PageView.renderView(PageView.java:258)
   at org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.renderMergedOutputModel(AbstractWebFrameworkView.java:316)
   at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
   at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:307)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
   at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
   at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
   at java.lang.Thread.run(Thread.java:662)
10:27:25,271 ERROR [org.springframework.extensions.surf.render.RenderService] An exception occurred while rendering: slingshot-login
org.springframework.extensions.surf.exception.RendererExecutionException: Cannot resolve template - may be missing from the definition: template-instance: slingshot-login, <?xml version="1.0" encoding="UTF-8"?>

<template-instance>
  <title>Slingshot Login Template</title> 
  <template-type>org/alfresco/global/slingshot-login</template-type>
</template-instance>

   at org.springframework.extensions.surf.render.RenderService.processTemplate(RenderService.java:698)
   at org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer.calculateComponentDependencies(TemplateInstanceRenderer.java:61)
   at org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer.body(TemplateInstanceRenderer.java:118)
   at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:77)
   at org.springframework.extensions.surf.render.bean.PageRenderer.body(PageRenderer.java:85)
   at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:77)
   at org.springframework.extensions.surf.render.RenderService.renderPage(RenderService.java:763)
   at org.springframework.extensions.surf.mvc.PageView.dispatchPage(PageView.java:419)
   at org.springframework.extensions.surf.mvc.PageView.renderView(PageView.java:258)
   at org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.renderMergedOutputModel(AbstractWebFrameworkView.java:316)
   at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
   at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:307)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
   at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
   at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
   at java.lang.Thread.run(Thread.java:662)

I could find this file(slingshot-login.xml) on "C:\Alfresco\tomcat\webapps\share\WEB-INF\classes\alfresco\site-data\template-instances"
and it is like that

<?xml version="1.0" encoding="UTF-8"?>
<template-instance>
  <title>Slingshot Login Template</title>
  <template-type>org/alfresco/global/slingshot-login</template-type>
</template-instance>

Moreover,i made some google search and find this fuction which give this exception

    public void processTemplate(RenderContext context, RenderFocus renderFocus, TemplateInstance template)
        throws RendererExecutionException
    {
        // special case variable for freemarker
        String uri = null;
       
        // the template type id
        TemplateType templateType = null;
        String templateTypeId = template.getTemplateTypeId();
       
        // test to see if this is a valid template type
        if (templateTypeId != null)
        {
            templateType = getObjectService().getTemplateType(templateTypeId);
            if (templateType == null)
            {
                // assume it is a freemarker template id
                uri = templateTypeId;
               
                // load the template type
                templateType = getObjectService().getTemplateType(TEMPLATE_TYPE_WEBTEMPLATE);
            }
        }
        else
        {
            // template type id is null and uri is null
            // shortcut: assume template type is the same as template id
            templateTypeId = template.getId();
           
            // if we have a uri, assume it is freemarker
            if (uri != null && templateTypeId == null)
            {
                templateTypeId = TEMPLATE_TYPE_WEBTEMPLATE;
            }
           
            // load the template type
            templateType = getObjectService().getTemplateType(templateTypeId);
        }
       
        // catch issues where the URL etc. have not been defined
        if (templateType == null)
        {
            throw new RendererExecutionException("Cannot resolve template - may be missing from the definition: " +
                    template.toString());
        }
       
        // get the processor
        Processor processor = getRenditionProcessor((Renderable)templateType);
        if (processor != null)
        {
            // build a processor context
            ProcessorContext processorContext = new ProcessorContext(context);
           
            // load from renderable data
            processorContext.load((Renderable)templateType);
           
            // apply any overrides from special cases
            if (uri != null)
            {
                ProcessorDescriptor viewDescriptor = processorContext.getDescriptor(RenderMode.VIEW);
                viewDescriptor.put("uri", uri);
            }
           
            // execute the processor
            try
            {
                processor.execute(processorContext, renderFocus);
            }
            catch(RendererExecutionException ree)
            {
                logger.error("Unable to process template: " + template.getId());
                throw ree;
            }
        }       
    }
   
This show that template type id could not find for this template.

There is template-types directory at "C:\Alfresco\tomcat\webapps\share\WEB-INF\classes\alfresco\site-data\template-types"
It contains only  site-index.xml file.

Are there any suggestion about this exception?
Why we did get this exception after easy installation without any change on configuration?

Thanks,

Outcomes