AnsweredAssumed Answered

Guest login with Command Servlet does not work in 2.1.2

Question asked by gravitonian Employee on Jun 5, 2008
Guest login via Command Servlet does not work in version 2.1.2 and 2.2.

I use a URL that looks like this:
http://localhost:8080/alfresco/command/email/login?username=admin&password=admin&guest=true

Anyone know what have changed, this worked in 2.1.1?

Get the following error:

org.alfresco.error.AlfrescoRuntimeException: Failed to authenticate as Guest user.
at org.alfresco.web.app.servlet.AuthenticationHelper.authenticate(AuthenticationHelper.java:213)
at org.alfresco.web.app.servlet.AuthenticationHelper.authenticate(AuthenticationHelper.java:109)
at org.alfresco.web.app.servlet.BaseServlet.servletAuthenticate(BaseServlet.java:147)
at org.alfresco.web.app.servlet.BaseServlet.servletAuthenticate(BaseServlet.java:117)
at org.alfresco.web.app.servlet.CommandServlet.service(CommandServlet.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalArgumentException: FacesContext must not be null
at org.springframework.util.Assert.notNull(Assert.java:113)
at org.springframework.web.jsf.FacesContextUtils.getWebApplicationContext(FacesContextUtils.java:50)
at org.springframework.web.jsf.FacesContextUtils.getRequiredWebApplicationContext(FacesContextUtils.java:81)
at org.alfresco.web.bean.repository.Repository.getServiceRegistry(Repository.java:435)
at org.alfresco.web.bean.repository.Preferences.getNodeService(Preferences.java:107)
at org.alfresco.web.bean.repository.Preferences.getValue(Preferences.java:79)
at org.alfresco.web.app.Application.getLanguage(Application.java:622)
at org.alfresco.web.app.servlet.AuthenticationHelper.authenticate(AuthenticationHelper.java:187)

I can get this to work if I do a login via the Web Client interface.
Then it is like the faces context or something is loaded correctly after that.

Outcomes