epierce/cas-server-extension-duo

Spring Security Issue While deploying

Closed this issue · 3 comments

NeerT commented

I am trying to setup CASDUO with CAS version 3.5.2 and also have clearpass-extension. when I deploy the cas.war after setting up the cas-server-extension-duo I get below exception

java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: Root WebApplicationContext: startup date [Tue Apr 12 00:02:07 IST 2016]; root of context hierarchy
at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:337)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:324)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1025)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:988)
at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:556)
at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:142)
at org.jasig.cas.web.init.SafeContextLoaderListener.contextDestroyed_aroundBody2(SafeContextLoaderListener.java:109)
at org.jasig.cas.web.init.SafeContextLoaderListener.contextDestroyed_aroundBody3$advice(SafeContextLoaderListener.java:57)
at org.jasig.cas.web.init.SafeContextLoaderListener.contextDestroyed(SafeContextLoaderListener.java:1)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5035)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5687)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1879)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
2016-04-12 00:02:08,226 WARN [org.springframework.web.context.support.XmlWebApplicationContext] - Exception thrown from LifecycleProcessor on context close
java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: Root WebApplicationContext: startup date [Tue Apr 12 00:02:07 IST 2016]; root of context hierarchy
at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:350)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1033)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:988)
at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:556)
at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:142)
at org.jasig.cas.web.init.SafeContextLoaderListener.contextDestroyed_aroundBody2(SafeContextLoaderListener.java:109)
at org.jasig.cas.web.init.SafeContextLoaderListener.contextDestroyed_aroundBody3$advice(SafeContextLoaderListener.java:57)
at org.jasig.cas.web.init.SafeContextLoaderListener.contextDestroyed(SafeContextLoaderListener.java:1)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5035)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5687)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1879)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

NeerT commented

It was because of cas-addons change notification settings removed that and now it seems to be working fine

Thanks for updating the issue. I was in the middle of configuring a test system to try and replicate it. I didn't recognize ApplicationEventMulticaster, so I thought it must be something outside the Duo config

NeerT commented

The only problem I faced was in "RegisteredServiceMultiFactorLookupManager" "registeredServiceWithAttributes.getExtraAttributes().get(this.mfaRequiredKey)" line was giving me null even I had this configured. Once I changed it to "registeredServiceWithAttributes.getExtraAttributes().get("casMFARequired")" it gave me the correct value.