cancel
Showing results for 
Search instead for 
Did you mean: 

Surf Installation problem

tmlutas
Champ in-the-making
Champ in-the-making
I'm trying to install Surf and while I can get it to compile the .war file and put it in my Tomcat5 directory, I get an internal error when I navigate to the welcome page. Here's the basics of what I've got

Centos 5.2
installed alfresco using the following instructions: http://wiki.alfresco.com/wiki/Installing_Alfresco_Community_WAR_on_Centos_5
installed surf using the following instructions: http://wiki.alfresco.com/wiki/Surf_Platform#Distribution_and_Packaging
I get the following output when I go to http://localhost:8080/alfwf/page?p=welcome


Test 01 as executed /test/alfwebtest01 the htmlid for the component: global_x002e_header
Test 01 JSON message bundle: {"message1": "This is \"message 1\"", "message2": "This is message 2"}
Test 01 args: guid=global.header id=global.header region-id=header source-id=global scope=global arg2=before–middle–after arg1=arg1value htmlid=global_x002e_header url=/test/alfwebtest01?node={noderef}
Test 01 component url model: /alfwf and /alfwf/service/test/alfwebtest01?node= and node=
Test 01 page url model:

    * page.url.context: /alfwf
    * page.url.servletContext: /alfwf/page
    * page.url.uri: /alfwf/page
    * page.url.url: /alfwf/page?p=welcome
    * page.url.queryString: p=welcome

Default region content

A header component is above this plain text.
Now a nav component appears…
Test 02 Component - has 8 args

Some plain text, and another component…
Alfresco    Web Script Status 500 - Internal Error

The Web Script /alfwf/service/test/configtest has responded with a status of 500 - Internal Error.

500 Description:   An error inside the HTTP server which prevented it from fulfilling the request.

Message:   Failed to load script '/test/configtest.get.js (in classpath store file:/usr/share/tomcat5/webapps/alfwf/WEB-INF/classes/alfresco/site-webscripts)': ReferenceError: "XML" is not defined. (AlfrescoScript#54)
   
Exception:   org.mozilla.javascript.EcmaError - ReferenceError: "XML" is not defined. (AlfrescoScript#54)
   
   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.c1._c0(AlfrescoScript:54)
   org.mozilla.javascript.gen.c1.call(AlfrescoScript)
   org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
   org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
   org.mozilla.javascript.gen.c1.call(AlfrescoScript)
   org.mozilla.javascript.gen.c1.exec(AlfrescoScript)
   org.mozilla.javascript.Context.evaluateString(Context.java:1196)
   org.alfresco.web.scripts.PresentationScriptProcessor.executeScriptImpl(PresentationScriptProcessor.java:234)
   org.alfresco.web.scripts.PresentationScriptProcessor.executeScript(PresentationScriptProcessor.java:115)
   org.alfresco.web.scripts.AbstractWebScript.executeScript(AbstractWebScript.java:759)
   org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:88)
   org.alfresco.web.scripts.PresentationContainer.executeScript(PresentationContainer.java:53)
   org.alfresco.web.scripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContainer.java:186)
   org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:240)
   org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:139)
   org.alfresco.web.scripts.WebScriptRenderer.execute(WebScriptRenderer.java:272)
   org.alfresco.web.site.RenderUtil.renderRawComponent(RenderUtil.java:514)
   org.alfresco.web.site.taglib.ComponentIncludeTag.doStartTag(ComponentIncludeTag.java:49)
   org.alfresco.tools.TagUtil.execute(TagUtil.java:143)
   org.alfresco.tools.TagUtil.execute(TagUtil.java:79)
   org.alfresco.web.scripts.FreemarkerTagSupportDirective.executeTag(FreemarkerTagSupportDirective.java:95)
   org.alfresco.web.scripts.GenericFreemarkerTagDirective.execute(GenericFreemarkerTagDirective.java:127)
   freemarker.core.Environment.visit(Environment.java:261)
   freemarker.core.UnifiedCall.accept(UnifiedCall.java:126)
   freemarker.core.Environment.visit(Environment.java:208)
   freemarker.core.Environment.process(Environment.java:188)
   freemarker.template.Template.process(Template.java:237)
   org.alfresco.web.scripts.PresentationTemplateProcessor.process(PresentationTemplateProcessor.java:146)
   org.alfresco.web.scripts.FreemarkerRenderer.execute(FreemarkerRenderer.java:219)
   org.alfresco.web.site.RenderUtil.executeRenderer(RenderUtil.java:877)
   org.alfresco.web.site.RenderUtil.executeRenderer(RenderUtil.java:854)
   org.alfresco.web.site.RenderUtil.renderComponent(RenderUtil.java:457)
   org.alfresco.web.site.PresentationUtil.renderComponent(PresentationUtil.java:202)
   org.alfresco.web.site.taglib.ComponentTag.doStartTag(ComponentTag.java:100)
   org.alfresco.tools.TagUtil.execute(TagUtil.java:143)
   org.alfresco.tools.TagUtil.execute(TagUtil.java:79)
   org.alfresco.web.scripts.FreemarkerTagSupportDirective.executeTag(FreemarkerTagSupportDirective.java:95)
   org.alfresco.web.scripts.FreemarkerTagSupportDirective.executeTag(FreemarkerTagSupportDirective.java:73)
   org.alfresco.web.scripts.ComponentFreemarkerTagDirective.execute(ComponentFreemarkerTagDirective.java:118)
   freemarker.core.Environment.visit(Environment.java:261)
   freemarker.core.UnifiedCall.accept(UnifiedCall.java:126)
   freemarker.core.Environment.visit(Environment.java:208)
   freemarker.core.MixedContent.accept(MixedContent.java:92)
   freemarker.core.Environment.visit(Environment.java:208)
   freemarker.core.Environment.process(Environment.java:188)
   freemarker.template.Template.process(Template.java:237)
   org.alfresco.web.scripts.PresentationTemplateProcessor.process(PresentationTemplateProcessor.java:146)
   org.alfresco.web.scripts.FreemarkerRenderer.execute(FreemarkerRenderer.java:219)
   org.alfresco.web.site.RenderUtil.executeRenderer(RenderUtil.java:877)
   org.alfresco.web.site.RenderUtil.executeRenderer(RenderUtil.java:854)
   org.alfresco.web.site.RenderUtil.renderRegion(RenderUtil.java:374)
   org.alfresco.web.site.PresentationUtil.renderRegion(PresentationUtil.java:164)
   org.alfresco.web.site.taglib.RegionTag.doStartTag(RegionTag.java:113)
   org.alfresco.tools.TagUtil.execute(TagUtil.java:143)
   org.alfresco.tools.TagUtil.execute(TagUtil.java:79)
   org.alfresco.web.scripts.FreemarkerTagSupportDirective.executeTag(FreemarkerTagSupportDirective.java:95)
   org.alfresco.web.scripts.RegionFreemarkerTagDirective.execute(RegionFreemarkerTagDirective.java:128)
   freemarker.core.Environment.visit(Environment.java:261)
   freemarker.core.UnifiedCall.accept(UnifiedCall.java:126)
   freemarker.core.Environment.visit(Environment.java:208)
   freemarker.core.MixedContent.accept(MixedContent.java:92)
   freemarker.core.Environment.visit(Environment.java:208)
   freemarker.core.Environment.process(Environment.java:188)
   freemarker.template.Template.process(Template.java:237)
   org.alfresco.web.scripts.PresentationTemplateProcessor.process(PresentationTemplateProcessor.java:146)
   org.alfresco.web.scripts.FreemarkerRenderer.execute(FreemarkerRenderer.java:219)
   org.alfresco.web.site.RenderUtil.renderTemplate(RenderUtil.java:266)
   org.alfresco.web.site.RenderUtil.renderPage(RenderUtil.java:170)
   org.alfresco.web.site.PresentationUtil.renderPage(PresentationUtil.java:88)
   org.alfresco.web.site.servlet.DispatcherServlet.dispatchPage(DispatcherServlet.java:459)
   org.alfresco.web.site.servlet.DispatcherServlet.dispatch(DispatcherServlet.java:360)
   org.alfresco.web.site.servlet.DispatcherServlet.service(DispatcherServlet.java:148)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
   org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
   org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
   org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
   org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
   java.lang.Thread.run(Thread.java:619)
   
Exception:   org.alfresco.web.scripts.WebScriptException - ReferenceError: "XML" is not defined. (AlfrescoScript#54)
   
   org.alfresco.web.scripts.PresentationScriptProcessor.executeScriptImpl(PresentationScriptProcessor.java:239)
   
Exception:   org.alfresco.web.scripts.WebScriptException - Failed to load script '/test/configtest.get.js (in classpath store file:/usr/share/tomcat5/webapps/alfwf/WEB-INF/classes/alfresco/site-webscripts)': ReferenceError: "XML" is not defined. (AlfrescoScript#54)
   
   org.alfresco.web.scripts.PresentationScriptProcessor.executeScript(PresentationScriptProcessor.java:120)
   
Server:   Alfresco <unknown> v<unknown> schema -1
Time:   Oct 30, 2008 4:40:43 PM
   
Diagnostics:   Inspect Web Script (test/configtest.get)
4 REPLIES 4

t_broyer
Champ in-the-making
Champ in-the-making
I'm trying to install Surf and while I can get it to compile the .war file and put it in my Tomcat5 directory, I get an internal error when I navigate to the welcome page.

[…]

Alfresco    Web Script Status 500 - Internal Error

The Web Script /alfwf/service/test/configtest has responded with a status of 500 - Internal Error.

500 Description:   An error inside the HTTP server which prevented it from fulfilling the request.

Message:   Failed to load script '/test/configtest.get.js (in classpath store file:/usr/share/tomcat5/webapps/alfwf/WEB-INF/classes/alfresco/site-webscripts)': ReferenceError: "XML" is not defined. (AlfrescoScript#54)

Seems like you have some older Rhino on your classpath. Surf is using Rhino 1.6R7 that supports E4X (the "XML" object is an E4X global object).

See http://www.mozilla.org/rhino/download.html for some details on Rhino wrt E4X.

tmlutas
Champ in-the-making
Champ in-the-making
Seems like you have some older Rhino on your classpath. Surf is using Rhino 1.6R7 that supports E4X (the "XML" object is an E4X global object).

See http://www.mozilla.org/rhino/download.html for some details on Rhino wrt E4X.

So do I just download and install the latest and greatest Rhino or do I need to hunt down and kill the older stuff?

tmlutas
Champ in-the-making
Champ in-the-making
I installed the jpackage repos (rhino 1.7 is available there in the 5.0 distribution) and yum install rhino worked out. There doesn't seem to be any difference in the behavior though. My alfresco seems to be using 1.6r4. I'm thinking that this might be the problem.

tmlutas
Champ in-the-making
Champ in-the-making
I ended up reinstalling and not using the centos specific war installation and then trying to add features but rather the 3b platform. I no longer have this issue.