Recently had an issue with our deployment and have been trying to reinstall everything since. However ACS keeps throwing the below error. Due to customer requirements we are installing ACS onto a tomcat instance. I’m 99% sure it’s got something to do with how we are configuring ACS to use Keycloak. (The Keycloak itself is working fine for other projects) Any insights about what would be causing this error?

I can’t share the alfresco-global.properties file for security reasons, so, alternatively, a good example of how to set up alfresco to use a Keycloak server for authentication so I can fix the issue myself will suffice.

org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class [org.alfresco.web.app.servlet.CORSContextListener]
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorityBridgeTableCache' defined in class path resource [alfresco/cache-context.xml]:
 Cannot resolve reference to bean 'tenantAdminService' while setting bean property 'tenantAdminService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantAdminService' defined in URL [jar:file:webapps/alfresco/WEB-INF/lib/alfresco-repository-7.199.321.jar!/alfresco/mt/mt-admin-context.xml]:
 Cannot resolve reference to bean 'dbNodeServiceImpl' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbNodeService' defined in class path resource [alfresco/node-services-context.xml]:
 Cannot resolve reference to bean 'permissionServiceImpl' while setting bean property 'permissionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionServiceImpl' defined in class path resource [alfresco/public-services-security-context.xml]:
 Cannot resolve reference to bean 'mtAwareNodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException:
 Error creating bean with name 'mtAwareNodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException:
 Error creating bean with name 'nodeServiceWithMemLocks': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException:
 Error creating bean with name 'lockableAspectInterceptor' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'lockService' while setting bean property 'lockService'; nested exception is org.springframework.beans.factory.BeanCreationException:
 Error creating bean with name 'lockService' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'authenticationService' while setting bean property 'authenticationService'; nested exception is org.springframework.beans.factory.BeanCreationException:
 Error creating bean with name 'authenticationService' defined in class path resource [alfresco/authentication-services-context.xml]:
 Cannot resolve reference to bean 'Authentication' while setting bean property 'applicationContextManager'; nested exception is org.springframework.beans.factory.BeanCreationException:
 Error creating bean with name 'Authentication' defined in class path resource [alfresco/authentication-services-context.xml]:
 Invocation of init method failed;

Caused by: java.lang.IllegalStateException: Invalid type keycloak specified for Authentication subsystem. No context file found
    at org.alfresco.repo.management.subsystems.ChildApplicationContextFactory.afterPropertiesSet(ChildApplicationContextFactory.java:298)
    at org.alfresco.repo.management.subsystems.ChildApplicationContextFactory.<init>(ChildApplicationContextFactory.java:214)
    at org.alfresco.repo.management.subsystems.DefaultChildApplicationContextManager$ApplicationContextManagerState.updateOrder(DefaultChildApplicationContextManager.java:463)
    at org.alfresco.repo.management.subsystems.DefaultChildApplicationContextManager$ApplicationContextManagerState.<init>(DefaultChildApplicationContextManager.java:259)
    at org.alfresco.repo.management.subsystems.DefaultChildApplicationContextManager.createInitialState(DefaultChildApplicationContextManager.java:175)
    at org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean.doInit(AbstractPropertyBackedBean.java:452)
    at org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean.init(AbstractPropertyBackedBean.java:426)
    at org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean.afterPropertiesSet(AbstractPropertyBackedBean.java:415)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1830)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1767)
    ... 113 more