sjivan
Sep 21st, 2004, 01:51 PM
I'm trying to use Acegi with Weblogic 8.1. In order to configure Spring's ApplicationContext, I have to use the ContextLoaderServlet servlet instead of ContextLoaderListener because unlike Tomcat, Weblogic 8.1 invokes the ServletContext startup listeners after “load-on-startup” servlets. (The initialization order was unclear in Servlet 2.3 and the Servlet 2.4 specification clarifies that startup listeners must be invoked before any other web components.).
However when using the ContextLoaderServlet along with Acegi, I get the following exception.
004-09-21 14:28:07 StandardContext[/myApp]: Exception starting filter Acegi Authentication Processing Filter
java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
at org.springframework.web.context.support.WebApplica tionContextUtils.getRequiredWebApplicationContext( WebApplicationContextUtils.java:69)
at net.sf.acegisecurity.util.FilterToBeanProxy.getCon text(FilterToBeanProxy.java:158)
at net.sf.acegisecurity.util.FilterToBeanProxy.init(F ilterToBeanProxy.java:98)
The same Acegi configuration works fine when I use ContextLoaderListener and run under Tomcat. We need to support running on Weblogic so switching to Tomcat is not an option. Is there a way to work around this issue?
Thanks,
Sanjiv
However when using the ContextLoaderServlet along with Acegi, I get the following exception.
004-09-21 14:28:07 StandardContext[/myApp]: Exception starting filter Acegi Authentication Processing Filter
java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
at org.springframework.web.context.support.WebApplica tionContextUtils.getRequiredWebApplicationContext( WebApplicationContextUtils.java:69)
at net.sf.acegisecurity.util.FilterToBeanProxy.getCon text(FilterToBeanProxy.java:158)
at net.sf.acegisecurity.util.FilterToBeanProxy.init(F ilterToBeanProxy.java:98)
The same Acegi configuration works fine when I use ContextLoaderListener and run under Tomcat. We need to support running on Weblogic so switching to Tomcat is not an option. Is there a way to work around this issue?
Thanks,
Sanjiv