AnsweredAssumed Answered

Web Script Status 500 - Internal Error

Question asked by ceci123 on Aug 30, 2009
Latest reply on Sep 4, 2009 by ceci123
Hi All.

I can upload a word file with no problem. However, when I try previewing it it will NOT work…I get 'can not be displayed message'. Then I click the 'Members' tab(link) and receive the error below.  Can this error be related to NOT been able to view the word document or is it related to something else. How can i fix this.  BTW. This is a brand new install on RHL5. Thanks a lot everyone.

————————————————————————————————————————
Web Script Status 500 - Internal Error

The Web Script /share/service/components/invite/members-bar 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:   Error during remote call. status: 500, response: null
Server:   Alfresco Labs v3.0.0 (Stable 1526) schema 1,002
Time:   Aug 30, 2009 10:24:21 AM
   
Diagnostics:   Inspect Web Script (org/alfresco/components/invite/members-bar.get)
Alfresco    Web Script Status 500 - Internal Error

The Web Script /share/service/components/site-members 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 '/org/alfresco/components/site-members/site-members.get.js (in classpath store file:/home/mike/ingres-alfresco-3.0.0stable-8/apache-tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts)': TypeError: Cannot read property "role" from null (file:/home/mike/ingres-alfresco-3.0.0stable-8/apache-tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/site-members/site-members.get.js#9)
   
Exception:   org.mozilla.javascript.EcmaError - TypeError: Cannot read property "role" from null (file:/home/mike/ingres-alfresco-3.0.0stable-8/apache-tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/site-members/site-members.get.js#9)
   
   org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3350)
   org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3340)
   org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3356)
   org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3375)
   org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3388)
   org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1362)
   org.mozilla.javascript.gen.c41._c0(file:/home/mike/ingres-alfresco-3.0.0stable-8/apache-tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/site-members/site-members.get.js:9)
   org.mozilla.javascript.gen.c41.call(file:/home/mike/ingres-alfresco-3.0.0stable-8/apache-tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/site-members/site-members.get.js)
   org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
   org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
   org.mozilla.javascript.gen.c41.call(file:/home/mike/ingres-alfresco-3.0.0stable-8/apache-tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/site-members/site-members.get.js)
   org.mozilla.javascript.gen.c41.exec(file:/home/mike/ingres-alfresco-3.0.0stable-8/apache-tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/site-members/site-members.get.js)
   org.alfresco.web.scripts.PresentationScriptProcessor.executeScriptImpl(PresentationScriptProcessor.java:256)
   org.alfresco.web.scripts.PresentationScriptProcessor.executeScript(PresentationScriptProcessor.java:148)
   org.alfresco.web.scripts.AbstractWebScript.executeScript(AbstractWebScript.java:800)
   org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:90)
   org.alfresco.web.scripts.PresentationContainer.executeScript(PresentationContainer.java:60)
   org.alfresco.web.scripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContainer.java:169)
   org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:261)
   org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:139)
   org.alfresco.web.scripts.WebScriptProcessor.executeBody(WebScriptProcessor.java:329)
   org.alfresco.web.framework.render.AbstractProcessor.execute(AbstractProcessor.java:85)
   org.alfresco.web.framework.render.RenderHelper.processComponent(RenderHelper.java:332)
   org.alfresco.web.framework.render.RenderUtil.renderRawComponent(RenderUtil.java:451)
   org.alfresco.web.framework.render.RenderUtil.renderRawComponent(RenderUtil.java:434)
   org.alfresco.web.framework.render.bean.ComponentRenderer.body(ComponentRenderer.java:135)
   org.alfresco.web.framework.render.RenderUtil.renderRegionComponents(RenderUtil.java:328)
   org.alfresco.web.site.taglib.RegionIncludeTag.doStartTag(RegionIncludeTag.java:43)
   org.alfresco.tools.TagUtil.execute(TagUtil.java:142)
   org.alfresco.tools.TagUtil.execute(TagUtil.java:78)
   org.alfresco.web.scripts.FreemarkerTagSupportDirective.executeTag(FreemarkerTagSupportDirective.java:89)
   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.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.FreemarkerProcessor.executeBody(FreemarkerProcessor.java:240)
   org.alfresco.web.framework.render.AbstractProcessor.execute(AbstractProcessor.java:85)
   org.alfresco.web.framework.render.RenderHelper.processRenderable(RenderHelper.java:276)
   org.alfresco.web.framework.render.bean.ChromeRenderer.body(ChromeRenderer.java:60)
   org.alfresco.web.framework.render.AbstractRenderer.render(AbstractRenderer.java:105)
   org.alfresco.web.framework.render.bean.RegionRenderer.body(RegionRenderer.java:134)
   org.alfresco.web.framework.render.AbstractRenderer.render(AbstractRenderer.java:105)
   org.alfresco.web.framework.render.RenderUtil.startRegionRenderer(RenderUtil.java:273)
   org.alfresco.web.framework.render.RenderUtil.renderRegion(RenderUtil.java:213)
   org.alfresco.web.framework.render.PresentationUtil.renderRegion(PresentationUtil.java:124)
   org.alfresco.web.site.taglib.RegionTag.doStartTag(RegionTag.java:109)
   org.alfresco.tools.TagUtil.execute(TagUtil.java:142)
   org.alfresco.tools.TagUtil.execute(TagUtil.java:78)
   org.alfresco.web.scripts.FreemarkerTagSupportDirective.executeTag(FreemarkerTagSupportDirective.java:89)
   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.visit(Environment.java:393)
   freemarker.core.BodyInstruction.accept(BodyInstruction.java:93)
   freemarker.core.Environment.visit(Environment.java:208)
   freemarker.core.MixedContent.accept(MixedContent.java:92)
   freemarker.core.Environment.visit(Environment.java:208)
   freemarker.core.Macro$Context.runMacro(Macro.java:164)
   freemarker.core.Environment.visit(Environment.java:601)
   freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
   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.FreemarkerProcessor.executeBody(FreemarkerProcessor.java:240)
   org.alfresco.web.framework.render.AbstractProcessor.execute(AbstractProcessor.java:85)
   org.alfresco.web.framework.render.RenderHelper.processTemplate(RenderHelper.java:376)
   org.alfresco.web.framework.render.bean.TemplateInstanceRenderer.body(TemplateInstanceRenderer.java:135)
   org.alfresco.web.framework.render.AbstractRenderer.render(AbstractRenderer.java:105)
   org.alfresco.web.framework.render.bean.PageRenderer.body(PageRenderer.java:81)
   org.alfresco.web.framework.render.AbstractRenderer.render(AbstractRenderer.java:105)
   org.alfresco.web.framework.render.RenderUtil.startPageRenderer(RenderUtil.java:144)
   org.alfresco.web.framework.render.RenderUtil.renderPage(RenderUtil.java:117)
   org.alfresco.web.framework.render.PresentationUtil.renderPage(PresentationUtil.java:85)
   org.alfresco.web.site.servlet.DispatcherServlet.dispatchPage(DispatcherServlet.java:459)
   org.alfresco.web.site.servlet.DispatcherServlet.dispatch(DispatcherServlet.java:336)
   org.alfresco.web.site.servlet.DispatcherServlet.service(DispatcherServlet.java:153)
   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:213)
   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
   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:874)
   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.LeadermikelowerWorkerThread.runIt(LeadermikelowerWorkerThread.java:81)
   org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
   java.lang.Thread.run(Thread.java:619)
   
Exception:   org.alfresco.web.scripts.WebScriptException - TypeError: Cannot read property "role" from null (file:/home/mike/ingres-alfresco-3.0.0stable-8/apache-tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/site-members/site-members.get.js#9)
   
   org.alfresco.web.scripts.PresentationScriptProcessor.executeScriptImpl(PresentationScriptProcessor.java:261)
   
Exception:   org.alfresco.web.scripts.WebScriptException - Failed to load script '/org/alfresco/components/site-members/site-members.get.js (in classpath store file:/home/mike/ingres-alfresco-3.0.0stable-8/apache-tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts)': TypeError: Cannot read property "role" from null (file:/home/mike/ingres-alfresco-3.0.0stable-8/apache-tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/site-members/site-members.get.js#9)
   
   org.alfresco.web.scripts.PresentationScriptProcessor.executeScript(PresentationScriptProcessor.java:152)
   
Server:   Alfresco Labs v3.0.0 (Stable 1526) schema 1,002
Time:   Aug 30, 2009 10:24:22 AM
   
Diagnostics:   Inspect Web Script (org/alfresco/components/site-members/site-members.get)


HERE IS THE site-members.get mentioned above.
———————– org/alfresco/components/site-members/site-members.get ———————-

Web Script: org/alfresco/components/site-members/site-members.get
Generated from /share/service/script/org/alfresco/components/site-members/site-members.get on Aug 30, 2009 10:36:08 AM

Script Properties
Id:   org/alfresco/components/site-members/site-members.get
Short Name:   site-members
Description:   Site Members component
Authentication:   none
Transaction:   none
Method:   GET
URL Template:   /components/site-members
Format Style:   any
Default Format:   html
Negotiated Formats:   [undefined]
Implementation:   class org.alfresco.web.scripts.DeclarativeWebScript
Extensions:   [undefined]

Store: classpath:alfresco/site-webscripts

File: org/alfresco/components/site-members/site-members.get.html.ftl

<script type="text/javascript">//<![CDATA[
   new Alfresco.SiteMembers("${args.htmlid}").setOptions(
   {
      siteId: "${page.url.templateArgs.site!""}",
      currentUser: "${user.id}",
      currentUserRole: "${currentUserRole}",
      roles:
      [
         <#list siteRoles as siteRole>"${siteRole}"<#if siteRole_has_next>,</#if></#list>
      ]
   }).setMessages(
      ${messages}
   );
//]]></script>

<div id="${args.htmlid}-body" class="site-members">
  
   <div class="heading"><label for="${args.htmlid}-term">${msg("site-members.heading")}</label></div>
  
   <div class="search-controls">
      <input id="${args.htmlid}-term" type="text" class="search-term" />
      <input id="${args.htmlid}-button" type="button" value="${msg("site-members.search-button")}" />
   </div>
  
   <#– this div contains the site members results –>
   <div id="${args.htmlid}-members" class="members-list"></div>
  
</div>

File: org/alfresco/components/site-members/site-members.get.js

var siteId = page.url.templateArgs.site;

// get the membership info for the current user in the current site
var url = "/api/sites/" + siteId + "/memberships/" + stringUtils.urlEncode(user.name);
var json = remote.call(url);
var membership = eval('(' + json + ')');

// add the role to the model
model.currentUserRole = membership.role;

// get the roles available in the current site
url = "/api/sites/" + siteId + "/roles";
json = remote.call(url);
var data = eval('(' + json + ')');

// add all roles except "None"
model.siteRoles = [];
for (var x=0; x < data.siteRoles.length; x++)
{
   if (data.siteRoles[x] != "None")
   {
      model.siteRoles.push(data.siteRoles[x]);
   }
}

File: org/alfresco/components/site-members/site-members.get.properties

## messages
message.empty=No members found
message.error=Error during search
message.changingrole=Changing role…
message.removing=Removing…
## general
site-members.heading=Search for Site Members
site-members.search-button=Search
site-members.searching=Searching…
site-members.enter-search-term=Enter a search term to find members
site-members.remove-success=Successfully removed user {0}
site-members.remove-failure=Failed to remove user {0} from site
site-members.change-role-success=Successfully changed role of user {0} to {1}
site-members.change-role-failure=Failed to change role of user {0}
site-members.uninvite=Remove

title=Title
company=Company

## roles
role.SiteConsumer=Consumer
role.SiteContributor=Contributor
role.SiteCollaborator=Collaborator
role.SiteManager=Manager

File: org/alfresco/components/site-members/site-members.get.desc.xml

<webscript>
  <shortname>site-members</shortname>
  <description>Site Members component</description>
  <url>/components/site-members</url>
</webscript>

File: org/alfresco/components/site-members/site-members.get.head.ftl

<!– People Finder Assets –>
<link rel="stylesheet" type="text/css" href="${page.url.context}/components/site-members/site-members.css" />
<script type="text/javascript" src="${page.url.context}/components/site-members/site-members.js"></script>

Store: classpath:alfresco/webscripts

[No implementation files]

Outcomes