08-06-2021 09:00 AM
Hello,
we have a problem with loading share pages created in our custom share AMP. We're using ACS 6.2 running inside docker containers. After startup everything loads perfetcly, but after few hours hitting some pages gives us this error:
javax.servlet.ServletException: Could not resolve view with name '<our-page>' in servlet with name 'Spring Surf Dispatcher Servlet'
After restarting Share app pages look fine for few hours and then disappear again.
It looks like some sort of problem with Surf/Spring cache inside persisters, but we failed at debugging it. Do you have any ideas what could cause such problems? Maybe we should change Tomcat cache config?
08-06-2021 10:22 AM
Mostly a Tomcat "problem":
08-09-2021 03:37 AM
Unfortunately we've already tried this solution without success. Our Tomcat conf.xml:
<Context> <WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource> <Resources cachingAllowed="true" cacheMaxSize="100000" /> </Context>
08-09-2021 01:07 PM
It seems strage, i hope you followed the appropriate way of creating the surf page using surf-extension.
Docs:
https://docs.alfresco.com/content-services/6.2/develop/share-ext-points/surf-pages/
Post deployment of your custom amp, you can also check the status of the module by going to: http://127.0.0.1:8081/share/page/modules/deploy
You can also try clearning the cache before restart and see if works (assuming the extension is correctly created as per the docs and deployed).
Refresh webscripts:
http://127.0.0.1:8081/share/page/index
Clear dependency cache (use POST request):
POST: http://127.0.0.1:8080/share/page/caches/dependency/clear
At last, try disabling the cache all-together, go to $TOMCAT_HOME/conf/Catalina/localhost/share.xml and update the Resources element given below:
<?xml version='1.0' encoding='utf-8'?> <Context crossContext="true"> <Resources cachingAllowed="false"> <PostResources base="${catalina.base}/../modules/share" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib"/> </Resources> </Context>
08-10-2021 09:31 AM
Abhinav,
Thank you, I'll try to test those changes tomorrow. I've also found some more strange logs not related with our custom amp:
2021-08-10 15:20:51,506 ERROR [alfresco.web.site] [http-nio-8080-exec-10] javax.servlet.ServletException: Could not resolve view with name 'url("/share/res/components/preview/WebPreviewerHTML_5d2468e9aa98a3fb37a6837bb5ff' in servlet with name 'Spring Surf Dispatcher Servlet' 2021-08-10 15:21:02,853 ERROR [alfresco.web.site] [http-nio-8080-exec-26] javax.servlet.ServletException: Could not resolve view with name 'url("/sha' in servlet with name 'Spring Surf Dispatcher Servlet' 2021-08-10 15:21:47,020 ERROR [alfresco.web.site] [http-nio-8080-exec-16] javax.servlet.ServletException: Could not resolve view with name 'url("/share/res/compon' in servlet with name 'Spring Surf Dispatcher Servlet' 2021-08-10 15:22:45,090 ERROR [alfresco.web.site] [http-nio-8080-exec-4] javax.servlet.ServletException: Could not resolve view with name 'url("/share/res/components/workflow/workflow-form_2ee28d70832ec4dd36276b' in servlet with name 'Spring Surf Dispatcher Servlet
Is it possible that Tomcat somehow cuts urls to resources?
08-10-2021 10:16 AM
hmm, not exactly sure why an extension would endup with these errors unless there is some missconfiguration or incorrect setup.
Also make sure if you have made any changes to share-config-custom.xml, there are no errors in the file (mostly typos and syntax errors).
If you are enterprise use, make sure you use the stable version. here is one for 6.2.x: https://github.com/Alfresco/acs-deployment/blob/master/docker-compose/6.2.N-docker-compose.yml
08-12-2021 10:07 AM
@rathoreshubhamm Don't spam the forum. This forum is to help, provide guidance etc. related to alfresco and integrations.
08-16-2021 02:40 AM
Disabling cache by
cachingAllowed="false"
and clearing dependency cache didn't work for me. I'll try to find wrong configuration in share-config-custom.xml.
Explore our Alfresco products with the links below. Use labels to filter content by product module.