AnsweredAssumed Answered

Error in thumbnail.get.js

Question asked by jordiv on Jan 12, 2011
Latest reply on Jan 21, 2011 by ben
Hi,

I've done some folders inside the publications section, and I've put documents inside them.

I retrieve the documents with the following dynamic query:
select d.* from cmis:document as d where in_folder('${section:.}') and d.cmis:objectTypeId='cmis:document' and d.cmis:contentStreamMimeType='application/pdf' order by d.cmis:creationDate desc

I've been doing tests, and when that query returns more than 200 results (more or less), Alfresco shows an error. The stacktrace is:


ERROR: org.springframework.extensions.webscripts.AbstractRuntime - Exception from executeScript - redirecting to status template error: 00120123 Failed to load script 'org.springframework.extensions.webscripts.ResourceStore$WebApplicationStoreScriptContent@8573e2': 00120122 
org.springframework.extensions.webscripts.WebScriptException: 00120123 Failed to load script 'org.springframework.extensions.webscripts.ResourceStore$WebApplicationStoreScriptContent@8573e2': 00120122
        at org.springframework.extensions.webscripts.processor.JSScriptProcessor.executeScript(JSScriptProcessor.java:195)
        at org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:982)
        at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86)
        at org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:69)
        at org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContainer.java:203)
        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:296)
        at org.springframework.extensions.surf.render.AbstractProcessor.execute(AbstractProcessor.java:79)
        at org.springframework.extensions.surf.render.RenderService.processComponent(RenderService.java:467)
        at org.springframework.extensions.surf.render.RenderService.renderRawComponent(RenderService.java:939)
        at org.springframework.extensions.surf.render.RenderService.renderRawComponent(RenderService.java:926)
        at org.springframework.extensions.surf.taglib.IncludeTag.doStartTag(IncludeTag.java:64)
        at org.springframework.extensions.surf.render.TagService.execute(TagService.java:213)
        at org.springframework.extensions.surf.render.TagService.execute(TagService.java:148)
        at org.springframework.extensions.webscripts.FreemarkerTagSupportDirective.executeTag(FreemarkerTagSupportDirective.java:92)
        at org.springframework.extensions.webscripts.GenericFreemarkerTagDirective.execute(GenericFreemarkerTagDirective.java:121)
        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.Environment.process(Environment.java:190)
        at freemarker.template.Template.process(Template.java:237)
        at org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:156)
        at org.springframework.extensions.webscripts.WebTemplateProcessor.executeBody(WebTemplateProcessor.java:338)
        at org.springframework.extensions.surf.render.AbstractProcessor.execute(AbstractProcessor.java:79)
        at org.springframework.extensions.surf.render.RenderService.processRenderable(RenderService.java:389)
        at org.springframework.extensions.surf.render.bean.ChromeRenderer.body(ChromeRenderer.java:96)
        at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:135)
        at org.springframework.extensions.surf.render.bean.ChromeRenderer.render(ChromeRenderer.java:79)
        at org.springframework.extensions.surf.render.bean.ComponentRenderer.body(ComponentRenderer.java:107)
        at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:135)
        at org.springframework.extensions.surf.render.RenderService.renderRegionComponents(RenderService.java:796)
        at org.springframework.extensions.surf.render.bean.RegionRenderer.body(RegionRenderer.java:120)
        at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:135)
        at org.springframework.extensions.surf.render.RenderService.startRegionRenderer(RenderService.java:748)
        at org.springframework.extensions.surf.render.RenderService.renderRegion(RenderService.java:692)
        at org.springframework.extensions.surf.render.PresentationUtil.renderRegion(PresentationUtil.java:113)
        at org.springframework.extensions.surf.taglib.RegionTag.doStartTag(RegionTag.java:102)
        at org.springframework.extensions.surf.render.TagService.execute(TagService.java:213)
        at org.springframework.extensions.surf.render.TagService.execute(TagService.java:148)
        at org.springframework.extensions.webscripts.FreemarkerTagSupportDirective.executeTag(FreemarkerTagSupportDirective.java:92)
        at org.springframework.extensions.webscripts.RegionFreemarkerTagDirective.execute(RegionFreemarkerTagDirective.java:122)
        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.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 freemarker.template.Template.process(Template.java:237)
        at org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:156)
        at org.springframework.extensions.webscripts.WebTemplateProcessor.executeBody(WebTemplateProcessor.java:338)
        at org.springframework.extensions.surf.render.AbstractProcessor.execute(AbstractProcessor.java:79)
        at org.springframework.extensions.surf.render.RenderService.processTemplate(RenderService.java:581)
        at org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer.body(TemplateInstanceRenderer.java:134)
        at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:135)
        at org.springframework.extensions.surf.render.bean.PageRenderer.body(PageRenderer.java:70)
        at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:135)
        at org.springframework.extensions.surf.render.RenderService.startPageRenderer(RenderService.java:633)
        at org.springframework.extensions.surf.render.RenderService.renderPage(RenderService.java:610)
        at org.springframework.extensions.surf.render.PresentationUtil.renderPage(PresentationUtil.java:74)
        at org.springframework.extensions.surf.mvc.PageView.dispatchPage(PageView.java:358)
        at org.springframework.extensions.surf.mvc.PageView.renderView(PageView.java:299)
        at org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.renderMergedOutputModel(AbstractWebFrameworkView.java:167)
        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.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: org.springframework.extensions.webscripts.WebScriptException: 00120122
        at org.springframework.extensions.webscripts.processor.JSScriptProcessor.executeScriptImpl(JSScriptProcessor.java:319)
        at org.springframework.extensions.webscripts.processor.JSScriptProcessor.executeScript(JSScriptProcessor.java:191)
        … 104 more
Caused by: java.lang.NullPointerException
        at org.alfresco.wcm.client.impl.AssetFactoryWebscriptImpl.getAssetsById(AssetFactoryWebscriptImpl.java:167)
        at org.alfresco.wcm.client.impl.CachingAssetFactoryImpl.getAssetsById(CachingAssetFactoryImpl.java:185)
        at org.alfresco.wcm.client.impl.CachingAssetFactoryImpl.getAssetsById(CachingAssetFactoryImpl.java:209)
        at org.alfresco.wcm.client.impl.CollectionFactoryWebserviceImpl.getCollection(CollectionFactoryWebserviceImpl.java:153)
        at org.alfresco.wcm.client.impl.CollectionFactoryWebserviceImpl.getCollection(CollectionFactoryWebserviceImpl.java:96)
        at org.alfresco.wcm.client.service.CollectionService.getCollection(CollectionService.java:34)
        at sun.reflect.GeneratedMethodAccessor860.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)
        at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243)
        at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
        at org.mozilla.javascript.gen.c196._c0(/WEB-INF/webscripts/list/thumbnails.get.js:2)
        at org.mozilla.javascript.gen.c196.call(/WEB-INF/webscripts/list/thumbnails.get.js)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
        at org.mozilla.javascript.gen.c196.call(/WEB-INF/webscripts/list/thumbnails.get.js)
        at org.mozilla.javascript.gen.c196.exec(/WEB-INF/webscripts/list/thumbnails.get.js)
        at org.springframework.extensions.webscripts.processor.JSScriptProcessor.executeScriptImpl(JSScriptProcessor.java:313)
        … 105 more


It seems that the error is in the line 2 of thumbnails.js, that is:
model.articles = collectionService.getCollection(context.properties.section.id, args.collection);

If I put the "Maximum Size" parameter to 100 it goes well.
Any ideas or possible solutions to that?

I've also noticed that the publications section doesn't have any pagination for the results. Anyone knows if there is an easy way to do it?


Thanks!

Outcomes