AnsweredAssumed Answered

Alfresco 3.2r2 and CAS with LDAP, SEVER: Error filterStart

Question asked by grupblau on Mar 31, 2010
Latest reply on Aug 18, 2010 by ankit_yakkundi
Hi all,

I installed Alfresco 3.2r2 and it works fine.
Now I would like to authenticate users using an already up&running CAS server, wich retrives users from an LDAP server. I've setup it as said in http://wiki.alfresco.com/wiki/Central_Authentication_Service_Configuration, I'm not using mod_jk as mod_jk should not be necessary.

On tomcat/webapps/alfresco/WEB-INF/web.xml I have added:

<!– CAS client filter –>
<filter>
    <filter-name>CAS Filter</filter-name>
    <filter-class>edu.yale.its.tp.cas.client.filter.CASFilter</filter-class>
    <init-param>
        <param-name>edu.yale.its.tp.cas.client.filter.loginUrl</param-name>
        <param-value>https://blau.serveftp.net:8443/cas/login</param-value>
    </init-param>
    <init-param>
        <param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name>
        <param-value>https://blau.serveftp.net:8443/cas/serviceValidate</param-value>
    </init-param>
    <init-param>
        <param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name>
        <param-value>blau.serveftp.net:8380</param-value>
    </init-param>
</filter>
<!– end of CAS client filter –>

  <filter>
     <filter-name>Authentication Filter</filter-name>
     <description>Authentication filter mapped only to faces URLs. Other URLs generally use proprietary means to talk to the AuthenticationComponent</description>
     <!– filter-class>org.alfresco.repo.web.filter.beans.BeanProxyFilter</filter-class>
     <init-param>
        <param-name>beanName</param-name>
        <param-value>AuthenticationFilter</param-value>
     </init-param –>

     <filter-class>com.keembay.alfresco.web.app.servlet.CASAuthenticationFilter</filter-class>
     <init-param>
          <param-name>cas.user.label</param-name>
          <param-value>edu.yale.its.tp.cas.client.filter.user</param-value>
     </init-param>
     <!– For Novell IChain support use the following filter –>
     <!–
     <filter-class>org.alfresco.web.app.servlet.HTTPRequestAuthenticationFilter</filter-class>
     <init-param>
        <param-name>httpServletRequestAuthHeaderName</param-name>
        <param-value>x-user</param-value>
     </init-param>
     <init-param>
        <param-name>authPatternString</param-name>
        <param-value>.*</param-value>
     </init-param>
     –>
  </filter>

<!– CAS client filter-mapping –>
<filter-mapping>
    <filter-name>CAS Filter</filter-name>
    <url-pattern>/faces/*</url-pattern>
</filter-mapping>
<!– end of CAS client filter-mapping –>

This are the libs I have:

annotations-api.jar
casclient-2.1.1.jar
catalina-ant.jar
catalina-ha.jar
catalina.jar
catalina-tribes.jar
commons-el.jar
commons-logging-1.1.1.jar
el-api.jar
jasper-el.jar
jasper.jar
jasper-jdt.jar
jsp-api.jar
keembay-alfresco-cas.jar
mysql-connector-java-5.1.7-bin.jar
servlet-api.jar
tomcat-coyote.jar
tomcat-dbcp.jar
tomcat-i18n-es.jar
tomcat-i18n-fr.jar
tomcat-i18n-ja.jar


SSL keys are in the trust-stores, web.xml have https enabled with it's server key and the trus-store as tomcat start-up parametre.

When I start Alfresco I get this log:

31/03/2010 17:27:11 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-41443
31/03/2010 17:27:11 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1356 ms
31/03/2010 17:27:11 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
31/03/2010 17:27:11 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
31/03/2010 17:27:13 org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
17:27:20,216  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/repository.properties]
17:27:20,225  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/domain/transaction.properties]
17:27:20,225  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from URL [file:/var/opt/alfresco-3.2r2ce/tomcat/shared/classes/alfresco-global.properties]
17:27:20,334  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
17:27:41,783  INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
17:27:42,704  INFO  [domain.schema.SchemaBootstrap] No changes were made to the schema.
17:27:43,122  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'sysAdmin' subsystem, ID: [sysAdmin, default]
17:27:43,147  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
17:27:43,149  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'sysAdmin' subsystem, ID: [sysAdmin, default] complete
17:27:46,659 User:System INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'thirdparty' subsystem, ID: [thirdparty, default]
17:27:46,689 User:System INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
17:27:47,424 User:System WARN  [alfresco.util.OpenOfficeConnectionTester] An initial OpenOffice connection could not be established.
17:27:47,425 User:System INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'thirdparty' subsystem, ID: [thirdparty, default] complete
17:27:47,635  INFO  [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: /var/opt/alfresco-3.2r2ce/data
17:27:47,704  INFO  [admin.patch.PatchExecuter] Checking for patches to apply …
17:27:48,369  INFO  [admin.patch.PatchExecuter] No patches were required.
17:27:48,372 User:System INFO  [repo.module.ModuleServiceImpl] Found 0 module(s).
17:27:48,410  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'fileServers' subsystem, ID: [fileServers, default]
17:27:48,435  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
17:27:49,243  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
17:27:49,254  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
17:27:49,334  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1] complete
17:27:49,400  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'fileServers' subsystem, ID: [fileServers, default] complete
17:27:49,400  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'imap' subsystem, ID: [imap, default]
17:27:49,440  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
17:27:49,472  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'imap' subsystem, ID: [imap, default] complete
17:27:49,474  INFO  [repo.usage.UserUsageTrackingComponent] Enabled - calculate missing user usages …
17:27:49,497  INFO  [repo.usage.UserUsageTrackingComponent] Found 0 users to recalculate
17:27:49,497  INFO  [repo.usage.UserUsageTrackingComponent] … calculated missing usages for 0 users
17:27:49,497  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'Synchronization' subsystem, ID: [Synchronization, default]
17:27:49,504  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
17:27:49,532  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'Synchronization' subsystem, ID: [Synchronization, default] complete
17:27:49,775  INFO  [service.descriptor.DescriptorService] Alfresco JVM - v1.6.0_12-b04; maximum heap size 506,313MB
17:27:49,782  INFO  [service.descriptor.DescriptorService] Alfresco started (Community): Current version 3.2.0 (r2 2440) schema 3300 - Originally installed version 3.2.0 (r2 2440) schema 3300
17:28:01,012  INFO  [alfresco.util.OpenOfficeConnectionTester] The OpenOffice connection was re-established.
31/03/2010 17:28:06 org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
31/03/2010 17:28:06 org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
17:28:06,995  INFO  [management.subsystems.ChildApplicationContextFactory] Stopping 'Synchronization' subsystem, ID: [Synchronization, default]
17:28:06,995  INFO  [management.subsystems.ChildApplicationContextFactory] Stopped 'Synchronization' subsystem, ID: [Synchronization, default]
17:28:06,995  INFO  [management.subsystems.ChildApplicationContextFactory] Stopping 'fileServers' subsystem, ID: [fileServers, default]
17:28:20,089  INFO  [management.subsystems.ChildApplicationContextFactory] Stopped 'fileServers' subsystem, ID: [fileServers, default]
17:28:20,089  INFO  [management.subsystems.ChildApplicationContextFactory] Stopping 'imap' subsystem, ID: [imap, default]
17:28:20,089  INFO  [management.subsystems.ChildApplicationContextFactory] Stopped 'imap' subsystem, ID: [imap, default]
17:28:20,095  INFO  [management.subsystems.ChildApplicationContextFactory] Stopping 'thirdparty' subsystem, ID: [thirdparty, default]
17:28:20,107  INFO  [management.subsystems.ChildApplicationContextFactory] Stopped 'thirdparty' subsystem, ID: [thirdparty, default]
17:28:20,108  INFO  [management.subsystems.ChildApplicationContextFactory] Stopping 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
17:28:20,109  INFO  [management.subsystems.ChildApplicationContextFactory] Stopped 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
17:28:20,112  INFO  [management.subsystems.ChildApplicationContextFactory] Stopping 'sysAdmin' subsystem, ID: [sysAdmin, default]
17:28:20,112  INFO  [management.subsystems.ChildApplicationContextFactory] Stopped 'sysAdmin' subsystem, ID: [sysAdmin, default]
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
31/03/2010 17:28:21 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive mobile.war
17:28:22,350  INFO  [alfresco.config.JBossEnabledWebApplicationContext] Refreshing org.alfresco.config.JBossEnabledWebApplicationContext@1c340ca: display name [Root WebApplicationContext]; startup date [Wed Mar 31 17:28:22 CEST 2010]; root of context hierarchy
17:28:22,656  INFO  [alfresco.config.JBossEnabledWebApplicationContext] Bean factory for application context [org.alfresco.config.JBossEnabledWebApplicationContext@1c340ca]: org.springframework.beans.factory.support.DefaultListableBeanFactory@2a9c50
17:28:23,837  INFO  [web.scripts.DeclarativeRegistry] Registered 22 Web Scripts (+0 failed), 24 URLs
17:28:23,856  INFO  [web.scripts.AbstractRuntimeContainer] Initialised Presentation Web Script Container (in 194.80061ms)
17:28:23,933  INFO  [web.scripts.DeclarativeRegistry] Registered 40 Web Scripts (+0 failed), 42 URLs
17:28:23,947  INFO  [web.scripts.AbstractRuntimeContainer] Initialised WebFramework Web Script Container (in 88.8157ms)
17:28:23,984  INFO  [web.site.FrameworkHelper] Successfully Initialized Web Framework
31/03/2010 17:28:23 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive share.war
17:28:27,002  INFO  [web.site.FrameworkHelper] Successfully Initialized Web Framework
31/03/2010 17:28:27 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-41080
31/03/2010 17:28:27 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-41443
31/03/2010 17:28:27 org.apache.catalina.startup.Catalina start
INFO: Server startup in 75420 ms

The error is:
31/03/2010 17:28:06 org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
31/03/2010 17:28:06 org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors

As I found, most common cause of this error is missing the commons-logging library, but I have it. The error is not much explanatory, and I don't know how to print the stack-trace that should help a bit.

Any idea about my mistake? Thanks.

Outcomes