-
Jan 26th, 2012, 12:49 PM
#1
No ContextLoaderListener registered?
Hi
I have searched for this error and possible solutions. I haven't found a solution to my issue.
I am trying to get the Spring ApplicationContext from the ServletContext using the following code
WebApplicationContextUtils.getRequiredWebApplicati onContext(servletContext);
the reason is to access beans defined in the application-Context.xml file.
I get the following error
java.lang.IllegalStateException: No WebApplicationContext found : no ContextLoaderListener registered?
in my web.xml the ContextLoaderListener is defined as
<listener>
<listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
<listener>
I have also checked that the servletContext is indeed injected into my class from Spring (and its not null)
I am using JBoss4.2.2 GA with Apache CXF and Spring 3.0.5.RELEASE
Any help much appreciated.
Thanks
Amit
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules