cancel
Showing results for 
Search instead for 
Did you mean: 

Using wcmqs as ROOT

lemmy
Champ in-the-making
Champ in-the-making
Hi,

I'm trying to configure web quick start for the url:
http://localhost:8080

As described in http://forums.alfresco.com/en/viewtopic.php?f=52&t=39298&p=115152&hilit=root#p115152 I've done the following steps:
- Rename folger ROOT to ROOT.orig
- Rename wcmqs.war to ROOT.war
- Changing metadata (Web App Context) of Quick Start Editorial to /
- restart server

Requesting http://localhost:8080 leads to following error:

WARN : org.alfresco.wcm.client.impl.WebSiteServiceImpl - Received a request for unrecognised host+port: localhost:8080/
WARN : org.alfresco.wcm.client.interceptor.ApplicationDataInterceptor - Received request for which no configured website can be found: localhost:8080
DEBUG: org.alfresco.wcm.client.exceptionresolver.RepositoryExceptionResolver - Resolving exception from handler [org.alfresco.wcm.client.controller.GenericTemplateAssetController@17287ed]: org.alfresco.wcm.client.exception.PageNotFoundException
ERROR: org.alfresco.wcm.client.exceptionresolver.RepositoryExceptionResolver - org.alfresco.wcm.client.exception.PageNotFoundException
org.alfresco.wcm.client.exception.PageNotFoundException
   at org.alfresco.wcm.client.interceptor.ApplicationDataInterceptor.preHandle(ApplicationDataInterceptor.java:66)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:761)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
   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.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
   at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
   at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
   at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
   at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213)
   at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171)
   at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
   at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
   at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
   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)
DEBUG: org.alfresco.wcm.client.exceptionresolver.RepositoryExceptionResolver - Resolving to default view '500page' for exception of type [org.alfresco.wcm.client.exception.PageNotFoundException]
DEBUG: org.alfresco.wcm.client.exceptionresolver.RepositoryExceptionResolver - Exposing Exception as model attribute 'exception'
ERROR: org.springframework.extensions.surf.render.RenderService - An exception occurred while rendering: 500page
org.springframework.extensions.surf.exception.PageRendererExecutionException: Unable to locate template for page: 500page
   at org.springframework.extensions.surf.render.bean.PageRenderer.body(PageRenderer.java:83)
   at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:75)
   at org.springframework.extensions.surf.render.RenderService.renderPage(RenderService.java:408)
   at org.springframework.extensions.surf.mvc.PageView.dispatchPage(PageView.java:388)
   at org.springframework.extensions.surf.mvc.PageView.renderView(PageView.java:329)
   at org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.renderMergedOutputModel(AbstractWebFrameworkView.java:285)
   at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
   at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
   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.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
   at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
   at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
   at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
   at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213)
   at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171)
   at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
   at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
   at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
   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)

Am I missing anything?
3 REPLIES 3

bremmington
Champ on-the-rise
Champ on-the-rise
That looks like the right sequence. I've just done the same thing here and it works as expected. Exactly which version are you running? The code needed to support the root context went on to HEAD on 8/Dec/2010, so the earliest community release that would have it is 3.4.c.

lemmy
Champ in-the-making
Champ in-the-making
I'm running 3.4.d. After debugging I've found that in WebSiteServiceImpl::getWebSite key is "localhost:8080/". In refreshWebSiteCache key is "localhost:8080//". So they are not equal. I've added

if (context.equals("/")) {
               context = "";
            }

before the calculation of key in refreshWebSite. This solves my issue. Strange that you've a different behaviour…

bremmington
Champ on-the-rise
Champ on-the-rise
I'm using the current HEAD and, trawling back, I can see why we're seeing different things.

On 11 April a fix went in for the problem you're seeing. Another went in on 9 June to fix a problem relating to cases where no port number had been specified. Together, these changed WebSiteServiceImpl.refreshWebsiteCache so that it changed from:

            if (context == null)
            {
                context = "";
            }
            String key = hostName + ":" + hostPort.toString() + "/" + context;
to

            if (context == null)
            {
                context = "";
            }
            if (context.startsWith("/"))
            {
                context = context.substring(1);
            }
            if(hostPort == null)
            {
                // Default to port 80 if not set
                hostPort = new BigInteger("80");
            }
            String key = hostName + ":" + hostPort.toString() + "/" + context;