Problem with custom share pages: Could not resolve view with name...

cancel
Showing results for 
Search instead for 
Did you mean: 
marcin_halczuk
Member II

Problem with custom share pages: Could not resolve view with name...

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?

 

7 Replies
michaelp
Active Member

Re: Problem with custom share pages: Could not resolve view with name...

Mostly a Tomcat "problem":

https://stackoverflow.com/a/27300726

marcin_halczuk
Member II

Re: Problem with custom share pages: Could not resolve view with name...

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>
abhinavmishra14
Advanced

Re: Problem with custom share pages: Could not resolve view with name...

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/

https://docs.alfresco.com/content-services/6.2/develop/share-ext-points/modify-ootb-code/#modifying-...

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>

 

 

 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
marcin_halczuk
Member II

Re: Problem with custom share pages: Could not resolve view with name...

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?

abhinavmishra14
Advanced

Re: Problem with custom share pages: Could not resolve view with name...

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

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
abhinavmishra14
Advanced

Re: Problem with custom share pages: Could not resolve view with name...

@rathoreshubhamm  Don't spam the forum. This forum is to help, provide guidance etc. related to alfresco and integrations.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
marcin_halczuk
Member II

Re: Problem with custom share pages: Could not resolve view with name...

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.