cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anand6998 <anand6...@gmail.com>
Subject Error getting Spring Application context
Date Thu, 26 Jan 2012 18:26:54 GMT
I am trying to get the Spring ApplicationContext from the ServletContext
using the following code

WebApplicationContextUtils.getRequiredWebApplicationContext(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.ContextLoaderListener</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

--
View this message in context: http://cxf.547215.n5.nabble.com/Error-getting-Spring-Application-context-tp5433615p5433615.html
Sent from the cxf-issues mailing list archive at Nabble.com.

Mime
View raw message