AnsweredAssumed Answered

JS Logger in web-extension\templates\org\alfresco\

Question asked by sebek on Nov 29, 2010
Latest reply on Nov 30, 2010 by sebek
Hello,

I have problem with logger.log("") statement in package \web-extension\templates\org\alfresco\ - when I added this statement in documentlibrary.js I got:

5:04:42,018 http-8080-18 ERROR [extensions.surf.FrameworkUtil] org.springframework.extensions.surf.exception.RendererExecutionException: 10290039 Failed to load script 'classpath*:alfresco/web-extension/templates/org/alfresco/documentlibrary.js': 10290038 ReferenceError: "logger" is not defined. (file:/D:/work/alfresco/tomcat/shared/classes/alfresco/web-extension/templates/org/alfresco/documentlibrary.js#75)
   at org.springframework.extensions.webscripts.WebTemplateProcessor.executeBody(WebTemplateProcessor.java:270)
   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.calculateComponentDependencies(TemplateInstanceRenderer.java:69)
   at org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer.body(TemplateInstanceRenderer.java:126)
   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.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: org.springframework.extensions.webscripts.WebScriptException: 10290039 Failed to load script 'classpath*:alfresco/web-extension/templates/org/alfresco/documentlibrary.js': 10290038 ReferenceError: "logger" is not defined. (file:/D:/work/alfresco/tomcat/shared/classes/alfresco/web-extension/templates/org/alfresco/documentlibrary.js#75)
   at org.springframework.extensions.webscripts.processor.JSScriptProcessor.executeScript(JSScriptProcessor.java:195)
   at org.springframework.extensions.webscripts.WebTemplateProcessor.executeBody(WebTemplateProcessor.java:266)
   … 39 more
Caused by: org.springframework.extensions.webscripts.WebScriptException: 10290038 ReferenceError: "logger" is not defined. (file:/D:/work/alfresco/tomcat/shared/classes/alfresco/web-extension/templates/org/alfresco/documentlibrary.js#75)
   at org.springframework.extensions.webscripts.processor.JSScriptProcessor.executeScriptImpl(JSScriptProcessor.java:323)
   at org.springframework.extensions.webscripts.processor.JSScriptProcessor.executeScript(JSScriptProcessor.java:191)
   … 40 more


This problem doesn't occure for other package:  f.e for web-extension\site-webscripts\org\alfresco\modules logger works fine.
Where should I add some extra configuration?

Outcomes