Description
After building and running hippo-testsuite, if you enable page caching by setting/saving /hst:hst/hst:hosts/@hst:cacheable = true, then it fails to render homepage at http://localhost:8080/site/, with resulting in 500 error, leaving this log:
[INFO] [talledLocalContainer] 11.08.2019 16:47:22 WARN http-nio-8080-exec-10 [WebFilesServiceImpl.warn:242] Cannot find web files bundle 'site' below '/webfiles'
[INFO] [talledLocalContainer] 11.08.2019 16:47:22 WARN http-nio-8080-exec-10 [HstDelegateeFilterBean.doFilter:511] ContainerException for 'RequestUnknown macro: { method='GET', scheme='http', host='localhost}': org.hippoecm.hst.core.container.ContainerException: org.hippoecm.hst.core.container.ContainerException: org.onehippo.cms7.services.webfiles.WebFileException: Cannot find web files bundle 'site' below '/webfiles'
I've tried to generate stack traces through debugger, too:
[INFO] [talledLocalContainer] 11.08.2019 16:22:26 WARN http-nio-8080-exec-10 [WebFilesServiceImpl.warn:242] Cannot find web files bundle 'site' below '/webfiles' [INFO] [talledLocalContainer] org.hippoecm.hst.core.container.ContainerException: org.hippoecm.hst.core.container.ContainerException: org.onehippo.cms7.services.webfiles.WebFileException: Cannot find web files bundle 'site' below '/webfiles' [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.ESIPageInfoScanningValve.invoke(ESIPageInfoScanningValve.java:155) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.PageInfoRenderingValve.invoke(PageInfoRenderingValve.java:50) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.ResourceServingValve.invoke(ResourceServingValve.java:40) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.ActionValve.invoke(ActionValve.java:47) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.LocalizationValve.invoke(LocalizationValve.java:101) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.ContextResolvingValve.invoke(ContextResolvingValve.java:115) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.JCRSessionStatefulConcurrencyValve.invoke(JCRSessionStatefulConcurrencyValve.java:56) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.SubjectBasedSessionValve.invoke(SubjectBasedSessionValve.java:58) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.SecurityValve.invoke(SecurityValve.java:177) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [INFO] [talledLocalContainer] at org.hippoecm.hst.demo.container.ExampleTagFilteringValve.invoke(ExampleTagFilteringValve.java:105) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.CmsSecurityValve.invoke(CmsSecurityValve.java:60) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.AbstractHttpsSchemeValve.invoke(AbstractHttpsSchemeValve.java:246) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.InitializationValve.invoke(InitializationValve.java:40) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.HstSitePipeline.invokeValves(HstSitePipeline.java:173) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.HstSitePipeline.invoke(HstSitePipeline.java:155) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.HstRequestProcessorImpl.processRequest(HstRequestProcessorImpl.java:81) [INFO] [talledLocalContainer] at org.hippoecm.hst.container.HstDelegateeFilterBean.processResolvedSiteMapItem(HstDelegateeFilterBean.java:809) [INFO] [talledLocalContainer] at org.hippoecm.hst.container.HstDelegateeFilterBean.doFilter(HstDelegateeFilterBean.java:450) [INFO] [talledLocalContainer] at org.hippoecm.hst.container.DelegatingFilter.doFilter(DelegatingFilter.java:68) [INFO] [talledLocalContainer] at org.hippoecm.hst.container.HstFilter.doFilter(HstFilter.java:51) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [INFO] [talledLocalContainer] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) [INFO] [talledLocalContainer] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [INFO] [talledLocalContainer] at org.hippoecm.hst.container.XSSUrlFilter.doFilter(XSSUrlFilter.java:51) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [INFO] [talledLocalContainer] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [INFO] [talledLocalContainer] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [INFO] [talledLocalContainer] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [INFO] [talledLocalContainer] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [INFO] [talledLocalContainer] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) [INFO] [talledLocalContainer] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [INFO] [talledLocalContainer] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:836) [INFO] [talledLocalContainer] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1839) [INFO] [talledLocalContainer] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [INFO] [talledLocalContainer] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:748) [INFO] [talledLocalContainer] Caused by: org.hippoecm.hst.core.container.ContainerException: org.onehippo.cms7.services.webfiles.WebFileException: Cannot find web files bundle 'site' below '/webfiles' [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.PageCachingValve.invoke(PageCachingValve.java:78) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.ESIPageInfoScanningValve.invoke(ESIPageInfoScanningValve.java:105) [INFO] [talledLocalContainer] ... 58 more [INFO] [talledLocalContainer] Caused by: org.onehippo.cms7.services.webfiles.WebFileException: Cannot find web files bundle 'site' below '/webfiles' [INFO] [talledLocalContainer] at org.onehippo.cms7.services.webfiles.WebFilesServiceImpl.warnAndThrow(WebFilesServiceImpl.java:237) [INFO] [talledLocalContainer] at org.onehippo.cms7.services.webfiles.WebFilesServiceImpl.getBundleRoot(WebFilesServiceImpl.java:94) [INFO] [talledLocalContainer] at org.onehippo.cms7.services.webfiles.WebFilesServiceImpl.getJcrWebFileBundle(WebFilesServiceImpl.java:71) [INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [INFO] [talledLocalContainer] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [INFO] [talledLocalContainer] at java.lang.reflect.Method.invoke(Method.java:498) [INFO] [talledLocalContainer] at org.onehippo.cms7.services.ProxiedServiceHolder.lambda$new$0(ProxiedServiceHolder.java:68) [INFO] [talledLocalContainer] at com.sun.proxy.$Proxy83.getJcrWebFileBundle(Unknown Source) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.DefaultRequestInfoCacheKeyFragmentCreator.populateAntiCacheValue(DefaultRequestInfoCacheKeyFragmentCreator.java:99) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.DefaultRequestInfoCacheKeyFragmentCreator.create(DefaultRequestInfoCacheKeyFragmentCreator.java:53) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.PageCachingValve.appendRequestInfoToCacheKey(PageCachingValve.java:83) [INFO] [talledLocalContainer] at org.hippoecm.hst.core.container.PageCachingValve.invoke(PageCachingValve.java:67) [INFO] [talledLocalContainer] ... 60 more
Basically, the root cause is as follows:
- In the testsuite project, there's no webfiles bundle named "site", but "intranet". So, WebFilesServiceImpl.getBundleRoot fails and throws an WebFileException exception.
- However, org.hippoecm.hst.core.container.DefaultRequestInfoCacheKeyFragmentCreator doesn't catch the WebFileException exception, just bubbling up a ContainerException, resulting in the whole page processing failure.
I think org.hippoecm.hst.core.container.DefaultRequestInfoCacheKeyFragmentCreator should have caught the WebFileException exception as well, in which case it should have left warning logs and not set the optional anticache cache key.
Attachments
Issue Links
- blocks
-
HSTTWO-4637 Add searchEngineOrBot request flag in page cache key
- Closed