cancel
Showing results for 
Search instead for 
Did you mean: 

Error accessing my-activities script from the browser

gajop
Champ in-the-making
Champ in-the-making
Hello,
I'm getting an error browsing to the my-activites script in the share site.
URL: http://localhost:8080/share/page/components/dashlets/my-activities
The error message I get is:
An error has occured in the Share component: /share/page/components/dashlets/my-activities.
It responded with a status of 500 - Internal Error.
Error Code Information: 500 - An error inside the HTTP server which prevented it from fulfilling the request.
Error Message: 07290001 Failed to execute script 'classpath*:alfresco/site-webscripts/org/alfresco/components/dashlets/my-activities.get.js': 07290000 ReferenceError: "page" is not defined. (file:/home/gajop/alfresco-4.2.c/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/my-activities.get.js#25)
Server: Alfresco Spring WebScripts - v1.2.0 (Release 1207) schema 1,000
Time: Aug 29, 2013 11:26:39 AM
Click here to view full technical information on the error.
Exception: org.mozilla.javascript.EcmaError - ReferenceError: "page" is not defined. (file:/home/gajop/alfresco-4.2.c/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/my-activities.get.js#25)
org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3350)
org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3340)
org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3413)
org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1612)
org.mozilla.javascript.gen.c4._c2(file:/home/gajop/alfresco-4.2.c/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/my-activities.get.js:25)
org.mozilla.javascript.gen.c4.call(file:/home/gajop/alfresco-4.2.c/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/my-activities.get.js)
org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
org.mozilla.javascript.gen.c4._c0(file:/home/gajop/alfresco-4.2.c/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/my-activities.get.js:68)
org.mozilla.javascript.gen.c4.call(file:/home/gajop/alfresco-4.2.c/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/my-activities.get.js)
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
org.mozilla.javascript.gen.c4.call(file:/home/gajop/alfresco-4.2.c/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/my-activities.get.js)
org.mozilla.javascript.gen.c4.exec(file:/home/gajop/alfresco-4.2.c/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/my-activities.get.js)
org.springframework.extensions.webscripts.processor.JSScriptProcessor.executeScriptImpl(JSScriptProcessor.java:318)
org.springframework.extensions.webscripts.processor.JSScriptProcessor.executeScript(JSScriptProcessor.java:192)
org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:1305)
org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86)
org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:70)
org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContainer.java:240)
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:377)
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
org.springframework.extensions.webscripts.servlet.mvc.WebScriptView.renderMergedOutputModel(WebScriptView.java:104)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:374)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
java.lang.Thread.run(Thread.java:722)
Exception: org.springframework.extensions.webscripts.WebScriptException - 07290000 ReferenceError: "page" is not defined. (file:/home/gajop/alfresco-4.2.c/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/my-activities.get.js#25)
org.springframework.extensions.webscripts.processor.JSScriptProcessor.executeScriptImpl(JSScriptProcessor.java:328)
Exception: org.springframework.extensions.webscripts.WebScriptException - 07290001 Failed to execute script 'classpath*:alfresco/site-webscripts/org/alfresco/components/dashlets/my-activities.get.js': 07290000 ReferenceError: "page" is not defined. (file:/home/gajop/alfresco-4.2.c/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/my-activities.get.js#25)
org.springframework.extensions.webscripts.processor.JSScriptProcessor.executeScript(JSScriptProcessor.java:200)

PS: Should this even be accessed using the browser? That URL is listed here though: http://localhost/share/page/index/all
1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator
Hello,

this should not be accessed by a browser since it requires some information it can only obtain when invoked as part of a page rendering request. In the upcoming 4.2d release it should be possible to access this web script directly outside the scope of a dashboard by using the URL pattern outlined in <a href="http://blogs.alfresco.com/wp/developer/2013/03/05/under-the-hood-of-the-surf-updates/"> this blog post of David Draper</a>.

Regards
Axel