cancel
Showing results for 
Search instead for 
Did you mean: 

RM site broken

gnyce
Champ in-the-making
Champ in-the-making
After going through several upgrades, and testing different RM (record mgmt) site tests… I seem to have broken our RM site.  Deleting and re-creating the RM site does not appear to help at all.  I can create a file plan, and upload docs, but cannot preview, nor can I download them.   Below is the error message I get when trying to preview a recently uploaded document (3.4.d CE).  Welcome any suggestions about how to go about resolving…


08:26:53,615 http-80-10 ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 03270010 Failed to process template org/alfresco/components/preview/web-preview.get.html.ftl
org.springframework.extensions.webscripts.WebScriptException: 03270010 Failed to process template org/alfresco/components/preview/web-preview.get.html.ftl
        at org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:175)
        at org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:589)
        at org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267)
        at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)
        at org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:69)
        at org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContainer.java:231)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
        at org.springframework.extensions.webscripts.WebScriptProcessor.executeBody(WebScriptProcessor.java:284)
        at org.springframework.extensions.surf.render.AbstractProcessor.execute(AbstractProcessor.java:57)
        at org.springframework.extensions.surf.render.RenderService.processComponent(RenderService.java:264)
        at org.springframework.extensions.surf.render.bean.ComponentRenderer.body(ComponentRenderer.java:93)
        at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:75)
        at org.springframework.extensions.surf.render.RenderService.renderComponent(RenderService.java:600)
        at org.springframework.extensions.surf.render.RenderService.renderRegionComponents(RenderService.java:539)
        at org.springframework.extensions.surf.render.RenderService.renderChromeInclude(RenderService.java:893)
        at org.springframework.extensions.webscripts.ChromeIncludeFreeMarkerDirective.execute(ChromeIncludeFreeMarkerDirective.java:71)
        at freemarker.core.Environment.visit(Environment.java:263)
        at freemarker.core.UnifiedCall.accept(UnifiedCall.java:126)
        at freemarker.core.Environment.visit(Environment.java:210)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:210)
        at freemarker.core.Environment.process(Environment.java:190)
        at org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:171)
        at org.springframework.extensions.webscripts.WebTemplateProcessor.executeBody(WebTemplateProcessor.java:345)
        at org.springframework.extensions.surf.render.AbstractProcessor.execute(AbstractProcessor.java:57)
        at org.springframework.extensions.surf.render.RenderService.processRenderable(RenderService.java:186)
        at org.springframework.extensions.surf.render.bean.ChromeRenderer.body(ChromeRenderer.java:89)
        at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:75)
        at org.springframework.extensions.surf.render.bean.ChromeRenderer.render(ChromeRenderer.java:80)
        at org.springframework.extensions.surf.render.bean.RegionRenderer.body(RegionRenderer.java:92)
        at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:75)
        at org.springframework.extensions.surf.render.RenderService.renderRegion(RenderService.java:492)
        at org.springframework.extensions.webscripts.RegionFreemarkerTagDirective.execute(RegionFreemarkerTagDirective.java:75)
        at freemarker.core.Environment.visit(Environment.java:263)
        at freemarker.core.UnifiedCall.accept(UnifiedCall.java:126)
        at freemarker.core.Environment.visit(Environment.java:210)
        at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
        at freemarker.core.Environment.visit(Environment.java:210)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:210)
        at freemarker.core.Environment.visit(Environment.java:395)
        at freemarker.core.BodyInstruction.accept(BodyInstruction.java:93)
        at freemarker.core.Environment.visit(Environment.java:210)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:210)
        at freemarker.core.Macro$Context.runMacro(Macro.java:172)
        at freemarker.core.Environment.visit(Environment.java:603)
        at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
        at freemarker.core.Environment.visit(Environment.java:210)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:210)
        at freemarker.core.Environment.process(Environment.java:190)

        at org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:171)
        at org.springframework.extensions.webscripts.WebTemplateProcessor.executeBody(WebTemplateProcessor.java:345)
        at org.springframework.extensions.surf.render.AbstractProcessor.execute(AbstractProcessor.java:57)
        at org.springframework.extensions.surf.render.RenderService.processTemplate(RenderService.java:378)
        at org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer.body(TemplateInstanceRenderer.java:123)
        at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:75)
        at org.springframework.extensions.surf.render.bean.PageRenderer.body(PageRenderer.java:85)
        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.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:301)
        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.Http11Processor.process(Http11Processor.java:852)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:619)
Caused by: freemarker.template.TemplateException: Expected collection or sequence. node.previews evaluated instead to freemarker.template.SimpleHash on line 10, column 22 in org/alfresco/components/preview/web-preview.get.html.ftl.
        at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:135)
        at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:190)
        at freemarker.core.Environment.visit(Environment.java:417)
        at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
        at freemarker.core.Environment.visit(Environment.java:210)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:210)
        at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
        at freemarker.core.Environment.visit(Environment.java:210)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:210)
        at freemarker.core.Environment.process(Environment.java:190)
        at org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:171)
        … 90 more
4 REPLIES 4

eddie
Champ in-the-making
Champ in-the-making
Hi,

It seems that the template file web-preview.get.html.ftl has problems. See at the bottom of your stack trace:

Caused by: freemarker.template.TemplateException: Expected collection or sequence. node.previews evaluated instead to freemarker.template.SimpleHash on line 10, column 22 in org/alfresco/components/preview/web-preview.get.html.ftl.

i.e. the node.previews object is not of the expected type.

That's the obvious stuff, more interestingly, how to resolve?

You stated that you have upgraded and created/deleted RM sites. I wonder if you may have created a site under one version which was deleted after an upgrade? This is a potential source of problems, if the underlying schemas or methods for deletion have changed.

Is it possible for you to start from a fresh install and proceed to reproduce? If so, it looks like a genuine bug. If not, I suspect foul data.

Disclaimer: I don't have specific knowledge of this problem or RM module, I just looked at the stack trace and got interested.

regards, Søren

gnyce
Champ in-the-making
Champ in-the-making
Thanks for your reply.

You stated that you have upgraded and created/deleted RM sites. I wonder if you may have created a site under one version which was deleted after an upgrade? This is a potential source of problems, if the underlying schemas or methods for deletion have changed.

That could very well be the case.  There seems to be left-over cruft from previous RM implementations, perhaps.  Not sure if there is a way to cleanly remove it and start over (ideally).  Messed a little with the Module Mgmt Tool http://wiki.alfresco.com/wiki/Module_Management_Tool but no joy so far (thought being, perhaps installing w/out RM, then adding as am AMP…)

Is it possible for you to start from a fresh install and proceed to reproduce? If so, it looks like a genuine bug. If not, I suspect foul data.

Not easily… certainly would prefer not, as this is in production with a few other sites (one that has a bit of data).  We thought we would dip our toe in with regards to RM.  I'm cursing the fact that I tried it out earlier in a live setup.

I have created a default install with RM installed… nothing seems to be very different than a non-RM install, until you create a site and then go into it.  Once you enter that RM site, it seems to trigger stuff… creating of new REC* groups, etc.  I seem to be missing that trigger from running now, after having removed the site and trying to create a new RM site.  Not sure how many other options I have…

eddie
Champ in-the-making
Champ in-the-making
OK. Sorry I couldn't be of more assistance. Guess the only way forward is to get a paid subscription or have an Alfresco pro look at it.

Regards, Søren

gnyce
Champ in-the-making
Champ in-the-making
Update on this - I seem to have it working again.  I probably used a pretty big hammer on this, so testing to see if anything else was broken.

My best guess on what happened is that, in the midst of going from the 3.2 –> 3.3 –> 3.4 series of Alfresco, and the numerous kicking-of-tires we did on the RM site/module, that we got some cruft that was left over.  Deleting and rec-creating an RM site did not appear to help.  In testing with a new install, it seems that one of the triggers for doing stuff is when you 1) create an RM site, and 2) enter the RM site for the first time.  The thought was that I needed those triggers to be re-run, and properly implement the RM schema (3.4d CE).

In digging through the mysql db and trying to figure out the structure for RM stuff (alf_namespace, alf_qname, etc), it was clear that you just can't delete stuff b/c of the numerous constraints/foreign keys.  So I gathered the names of about 20 tables and turned on the ON DELETE CASCADE - in essence, creating the chain reaction to (in theory) more completely root out the RM stuff - starting by deleting the alf_namespace entries for DOD, RM, etc.  And curiously enough, it _seems_ to have worked.  Again, still early in testing, but now certain actions that would fail (create a fileplan, upload a file, preview, download, declare a record). 

By the way, I have no problem with a Dev stepping in and saying "Good God WTF are you playing at man?!"… or even "you know, you could have more easily/safely done X instead"….