AnsweredAssumed Answered

error LDAP with 2.9b

Question asked by fif on Jan 7, 2008
Latest reply on Jan 29, 2008 by andy
Hello

I just wanted to share the error I got with the last version from the svn. (my last update was today)

I was building and deploying a custom alfresco.war based on a war build from the svn.

The configuration with ldap worked fine with the previous version.
I had several file in the extension folder (ldap-authentication-context.xml, file-servers-custom.xml, authority-services-context.xml)
I had a good configuration and everything was ok with

but I updated the svn, built my war and deployed this again.
And I got the following error when trying to login


17:46:04,013 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
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.AuthenticationFilter.doFilter(AuthenticationFilter.java:75)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        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.NullPointerException
        at org.alfresco.repo.security.authentication.AbstractAuthenticationComponent.getGuestUserName(AbstractAuthenticationComponent.java:223)
        at org.alfresco.repo.security.authentication.AbstractAuthenticationComponent.setGuestUserAsCurrentUser(AbstractAuthenticationComponent.java:244)
        at org.alfresco.repo.security.authentication.AbstractAuthenticationComponent.setGuestUserAsCurrentUser(AbstractAuthenticationComponent.java:232)
        at org.alfresco.repo.security.authentication.AuthenticationServiceImpl.authenticateAsGuest(AuthenticationServiceImpl.java:187)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:241)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
        at $Proxy20.authenticateAsGuest(Unknown Source)
        at org.alfresco.web.app.servlet.AuthenticationHelper.authenticate(AuthenticationHelper.java:158)
        … 16 more

It took me hours (about 8 actually) to understand what was wrong.
(I thougth that it was due to my config)
It work fine with a build base from the svn before the 1st January 2008.


If this can help someone  :D, and also help to solve this problem for the great version 2.9.

Outcomes