cancel
Showing results for 
Search instead for 
Did you mean: 

[SOLVED] Selecting Site Members crashes

hobleyd
Champ in-the-making
Champ in-the-making
Hello,

I have just installed the Labs 3 Stable version of Alfresco and Share on CentOS 5.2 and I have been trying out Share. I can create a new Site ok, but when I click on Members within that site, I get the following stack trace:

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:/opt/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts)': TypeError: Cannot parse XML: Scanner State 24 not Recognized (file:/opt/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/site-members/site-members.get.js#6(eval)#1)
   
Exception:   org.mozilla.javascript.EcmaError - TypeError: Cannot parse XML: Scanner State 24 not Recognized (file:/opt/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/site-members/site-members.get.js#6(eval)#1)
   
   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.xmlimpl.XMLLibImpl.parse(XMLLibImpl.java:411)
   org.mozilla.javascript.xmlimpl.XMLLibImpl.ecmaToXml(XMLLibImpl.java:433)
   org.mozilla.javascript.xmlimpl.XMLObjectImpl.ecmaToXml(XMLObjectImpl.java:779)
   org.mozilla.javascript.xmlimpl.XML.jsConstructor(XML.java:250)
   org.mozilla.javascript.xmlimpl.XMLObjectImpl.execIdCall(XMLObjectImpl.java:570)
   org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:127)
   org.mozilla.javascript.BaseFunction.construct(BaseFunction.java:313)
   org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3281)
   org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2394)
   org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
   org.mozilla.javascript.ScriptRuntime.evalSpecial(ScriptRuntime.java:2280)
   org.mozilla.javascript.ScriptRuntime.callSpecial(ScriptRuntime.java:2143)
   org.mozilla.javascript.optimizer.OptRuntime.callSpecial(OptRuntime.java:165)
   org.mozilla.javascript.gen.c17._c0(file:/opt/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/site-members/site-members.get.js:6)
   org.mozilla.javascript.gen.c17.call(file:/opt/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.c17.call(file:/opt/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/site-members/site-members.get.js)
   org.mozilla.javascript.gen.c17.exec(file:/opt/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:802)
   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
   org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
   org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   java.lang.Thread.run(Thread.java:619)
   
Exception:   org.alfresco.web.scripts.WebScriptException - TypeError: Cannot parse XML: Scanner State 24 not Recognized (file:/opt/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/site-members/site-members.get.js#6(eval)#1)
   
   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:/opt/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts)': TypeError: Cannot parse XML: Scanner State 24 not Recognized (file:/opt/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/site-members/site-members.get.js#6(eval)#1)
   
   org.alfresco.web.scripts.PresentationScriptProcessor.executeScript(PresentationScriptProcessor.java:152)

Can anyone point me in the right direction please.

Cheers,
David
19 REPLIES 19

hobleyd
Champ in-the-making
Champ in-the-making
Certainly - apologies for that:

JDK: 1.6.0
RAM: 4 Gig
DB: Postgres 8.1
Disk: 75G available
App Server: tomcat 5.5.15

all running on CentOS 5.2

Cheers,
David

mikeh
Star Contributor
Star Contributor
One further question - what's the format of the usernames on your system? Do they contain any character other than 0-9, A-Z ?

Thanks,
Mike

hobleyd
Champ in-the-making
Champ in-the-making
Mike,

We have the . character in our usernames. This was a problem when logging in with the 3b version, but the log in was fixed as part of 3 Stable.

Cheers,
David

mikeh
Star Contributor
Star Contributor
That'll be it then - there must still be some bugs around handling usernames containing dots.

To fix this one, look for
alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/repository/site/membership/membership.get.desc.xml

and update it to:
<webscript>
  <shortname>Membership</shortname>
  <description>Get the membership details for a user</description>
  <url>/api/sites/{shortname}/memberships/{username}</url>
  <format default="json">argument</format>
  <authentication>user</authentication>
  <transaction>required</transaction>
</webscript>

Note the change on the format line.

Edit: http://issues.alfresco.com/jira/browse/ETHREEOH-1101

Thanks,
Mike

hobleyd
Champ in-the-making
Champ in-the-making
Yep - that has solved the problem, thanks. I have also updated the other files as per the attached issue.

Cheers,
David

hobleyd
Champ in-the-making
Champ in-the-making
Now I am noticing another couple of errors. They seem pretty basic - should I post the issues individually? Or should I assume they are part of the issue with dots in usernames?

If I create a site, the next time I log in the site does not show up in the My Sites section of the Dashboard.

If I then Search for the site, I get:

Wrapped Exception (with status template): Error during processing of the template 'Method public org.alfresco.repo.jscript.ScriptableHashMap org.alfresco.repo.site.script.Site.listMembers(java.lang.String,java.lang.String) threw an exception when invoked on org.alfresco.repo.site.script.Site@13b94d5'. Please contact your system administrator.

Cheers,
David

mikeh
Star Contributor
Star Contributor
I can't reproduce that last problem.

Could you provide reproducible steps please? i.e. the user name who's creating the site and the details you created the site with (randomise one or both if they contain private information, but keep the same format).

Thanks,
Mike

rondeth
Champ in-the-making
Champ in-the-making
FWIW, I'm having the exact same issues as hobleyd (the sites not listing on the dashboard and the search exception) and came here in search of info.

Fresh install, LDAP synch/auth working. Had logged in to the web client, user is an admin. User name formats contain letters and numbers, no special chars. User name was NTISRE01 and space name was 'pgacis'. I cruised around the new site for a while, adding content in the blogs/etc when all of a sudden it just started reading 'Site' in the top left, and the only button left on the top right was 'Join' (which errors out with an Ajax dialog saying 'cannot add user NTISR01 to this space' message).

Perhaps that helps, perhaps not.

Update: A little more context. It seems as soon as I get any sort of exception thrown is when it might happen…I notice the site is set to 'private' from then on in the top right, but no obvious way exists to change that back to public.

I'm also seeing error logs reading "Skipping activity post 9 since failed to get site members: java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/alfresco/service/api/sites/pgacis/memberships". I don't know if that's applicable/related though.

hobleyd
Champ in-the-making
Champ in-the-making
Mike,

Hmmm, I can no longer reproduce this now either. Last week it was as simple as creating it, logging out and logging back in again. This week, with exactly the same details it is working.

I  will play around some more and get back to you. It may be as per rondeth that I was seeing issues as a result of the crashes I was having previously. Let me investigate.

Cheers,
David