Spring Session security config and multiple contextLoaderListener classes exception -
i trying integrate spring session 1.2.0 existing spring mvc project configured spring security.
i have done configuration according these:
http://docs.spring.io/spring-session/docs/1.2.0.build-snapshot/reference/html5/guides/security.html
however, cannot deploy app on tomcat since keep getting exception:
severe: exception sending context initialized event listener instance of class org.springframework.web.context.contextloaderlistener java.lang.illegalstateexception: cannot initialize context because there root application context present - check whether have multiple contextloader* definitions in web.xml! @ org.springframework.web.context.contextloader.initwebapplicationcontext(contextloader.java:277) @ org.springframework.web.context.contextloaderlistener.contextinitialized(contextloaderlistener.java:112) @ org.apache.catalina.core.standardcontext.listenerstart(standardcontext.java:4992) @ org.apache.catalina.core.standardcontext.startinternal(standardcontext.java:5492) @ org.apache.catalina.util.lifecyclebase.start(lifecyclebase.java:150) @ org.apache.catalina.core.containerbase.addchildinternal(containerbase.java:901) @ org.apache.catalina.core.containerbase.addchild(containerbase.java:877) @ org.apache.catalina.core.standardhost.addchild(standardhost.java:649) @ org.apache.catalina.startup.hostconfig.deploywar(hostconfig.java:1083) @ org.apache.catalina.startup.hostconfig$deploywar.run(hostconfig.java:1879) @ java.util.concurrent.executors$runnableadapter.call(executors.java:511) @ java.util.concurrent.futuretask.run(futuretask.java:266) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:617) @ java.lang.thread.run(thread.java:745)
there related issue why spring application java-based configuration don't work properly
how configure spring session without creating new instance of contextloaderlistener
?
i had spring security configuration. solve problem put annotation @enablejdbchttpsession
in existing configuration , made sure data source , transanction manager configured.
Comments
Post a Comment