Thanks. That works for me. I remember that 2.2.9 did not have such restriction , do you know if this is introduced in a later version . ?
On Tue, Aug 9, 2011 at 1:36 AM, Prisca POLYTE <[email protected]> wrote: > Hi, > > You can keep your declaration in web.xml as you do. You can add in one of > your spring context-file an import tag > like this > <import resource="classpath:META-INF/cxf/cxf.xml" /> > > In that when your context is loaded, the cxf file will be loeded as well. > > It is exactly what I do and it works fine for me. > > HTH > > regards > Prisca > > > On Tue, Aug 9, 2011 at 6:30 AM, Anand Hemmige <[email protected]> wrote: > > > Hi, > > I apologize if this question is not intended to CXF community since Im > not > > really sure if the problem is with CXF or Spring. > > > > > > I have a web application where I use both Spring application context > files > > as well as cxf.xml. > > The spring application context files are all named as beans-*-context.xml > > and hence in my web.xml , I have defined > > > > <context-param> > > <param-name>contextConfigLocation</param-name> > > <param-value>WEB-INF/classes/beans-*-context.xml</param-value> > > </context-param> > > > > The cxf beans configuration are all in a file called cxf.xml. > > This set up was working just fine on CXF 2.2.8 and Spring 2.5.6. > > Ever since, I upgrade to CXF 2.4.1 ( and consequently Spring > 3.0.5.RELEASE, > > ) , cxf.xml does not seem to be recognized . So, when I start my web > > server, > > I see error stacktrace - > > org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean > > named 'cxf' is defined > > at > > > > > org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFac > > tory.java:527) > > at > > > > > org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactor > > y.java:1083) > > at > > > > > org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:274) > > > > However, when I name the cxf.xml of the format - beans-*-context.xml , > the > > CXF beans get loaded just fine. > > > > I browsed through the release notes of CXF 2.4.1 and also ( 2.3.4 ) , > but > > unfortunately Im not able to figure out the JIRA ticket that talks about > > such changes. > > Could any one shed some light on this. ? > > > > Thanks, > > Anand > > > > > > -- > Prisca Polyte > Xebia IT Architects > Email : [email protected] > Mobile : +33(0)6 12 32 98 76 > http://www.xebia.fr > http://blog.xebia.fr > > Siège Social > La Défense Colisée > 10 / 12 Avenue de l'arche > Faubourg de l'Arche > 92419 Courbevoie Cedex >
