cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christofer Dutz" <c.d...@upw.de>
Subject AW: "No bean named 'cxf' is defined" When using CXF 2.2 and AegisDatabinding
Date Fri, 20 Mar 2009 11:29:09 GMT
Ok ... I finally managed to sovle this problem too ...
After Changing from:
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
To:
    <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml"
/>

Everything is working ... except one problem I am startng a new thread for
:-)

Chris


-----Ursprüngliche Nachricht-----
Von: Christofer Dutz [mailto:c.dutz@upw.de] 
Gesendet: Freitag, 20. März 2009 10:49
An: users@cxf.apache.org
Betreff: AW: "No bean named 'cxf' is defined" When using CXF 2.2 and
AegisDatabinding

Ok ... as reply to my own post ... 

Was a little hard to find. The problem occurred when configuring the
bus-property of the AbstractDataBinding class. Here there was a Resource
annotation that referenced "cxf". I was missing the three imports that are
mentioned in the tutorials, but I never needed until now:
    <import resource="classpath:META-INF/cxf/cxf.xml" />
    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

My new problem is that now my application initializes nicely, but it
terminates immediately without any reason (Log4J set to ALL).





 

-----Ursprüngliche Nachricht-----
Von: Christofer Dutz [mailto:c.dutz@upw.de] 
Gesendet: Freitag, 20. März 2009 10:19
An: users@cxf.apache.org
Betreff: "No bean named 'cxf' is defined" When using CXF 2.2 and
AegisDatabinding

Hi,

 

I just upgraded my CXF 2.1.4 application to CXF 2.2 . unfortunately I am
getting strange errors L

 

Here my context.xml:

    <bean id="aegisContext"
class="de.upw.tiller.pgm.ws.datatypes.PgmAegisContext" scope="prototype">

        <property name="readXsiTypes" value="true"/>

        <property name="writeXsiTypes" value="true"/>

        <property name="rootClassNames">

            <list>

 
<value>de.upw.tiller.pgm.model.pgm.environments.PgmSshEnvironment</value>

 
<value>de.upw.tiller.pgm.model.pgm.environments.PgmTelnetEnvironment</value>

 
<value>de.upw.tiller.pgm.model.pgm.environments.PgmSudoEnvironment</value>

 
<value>de.upw.tiller.pgm.model.pgm.environments.PgmSuEnvironment</value>

 
<value>de.upw.tiller.pgm.model.pgm.credentials.PgmCredential</value>

 
<value>de.upw.tiller.pgm.model.pgm.credentials.PgmUsernamePasswordCredential
</value>

 
<value>de.upw.tiller.pgm.model.pgm.credentials.PgmX509CertificateCredential<
/value>

            </list>

        </property>

    </bean>

    

    <bean id="dataBinding"
class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype">

        <property name="aegisContext" ref="aegisContext"/>

    </bean>

    

    <simple:server id="facadeWebService" 

        serviceClass="de.upw.tiller.pgm.service.PgmFacadeService" 

        address="http://localhost:9000/pgmService">

        <simple:serviceBean>

            <ref bean="facadeService" />

        </simple:serviceBean>

        <simple:dataBinding>

            <ref bean="dataBinding"/>

        </simple:dataBinding>

    </simple:server>

 

As soon as I start the application I am getting this:

 

Exception in thread "main"
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'facadeWebService': Cannot resolve reference to bean 'dataBinding'
while setting bean property 'dataBinding'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'dataBinding': Injection of resource methods failed; nested
exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'cxf' is defined

      at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eReference(BeanDefinitionValueResolver.java:275)

      at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eValueIfNecessary(BeanDefinitionValueResolver.java:104)

      at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)

      at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.populateBean(AbstractAutowireCapableBeanFactory.java:1010)

      at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)

      at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
$1.run(AbstractAutowireCapableBeanFactory.java:409)

      at java.security.AccessController.doPrivileged(Native Method)

      at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:380)

      at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:264)

      at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:222)

      at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
ractBeanFactory.java:261)

      at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:185)

      at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:164)

      at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
antiateSingletons(DefaultListableBeanFactory.java:429)

      at
org.springframework.context.support.AbstractApplicationContext.finishBeanFac
toryInitialization(AbstractApplicationContext.java:728)

      at
org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:380)

      at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(Cl
assPathXmlApplicationContext.java:139)

      at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(Cl
assPathXmlApplicationContext.java:93)

      at de.upw.tiller.pgm.ws.PgmServer.<init>(PgmServer.java:14)

      at de.upw.tiller.pgm.ws.PgmServer.main(PgmServer.java:22)

Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'dataBinding': Injection of resource methods failed;
nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'cxf' is defined

      at
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.pos
tProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:305)

      at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.populateBean(AbstractAutowireCapableBeanFactory.java:998)

      at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)

      at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
$1.run(AbstractAutowireCapableBeanFactory.java:409)

      at java.security.AccessController.doPrivileged(Native Method)

      at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:380)

      at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
ractBeanFactory.java:283)

      at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:185)

      at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:164)

      at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eReference(BeanDefinitionValueResolver.java:269)

      ... 19 more

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException:
No bean named 'cxf' is defined

      at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean
Definition(DefaultListableBeanFactory.java:387)

      at
org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocal
BeanDefinition(AbstractBeanFactory.java:971)

      at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
ractBeanFactory.java:246)

      at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:185)

      at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:168)

      at
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.aut
owireResource(CommonAnnotationBeanPostProcessor.java:435)

      at
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.get
Resource(CommonAnnotationBeanPostProcessor.java:409)

      at
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$Res
ourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:537)

      at
org.springframework.beans.factory.annotation.InjectionMetadata$InjectedEleme
nt.inject(InjectionMetadata.java:192)

      at
org.springframework.beans.factory.annotation.InjectionMetadata.injectMethods
(InjectionMetadata.java:117)

      at
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.pos
tProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:302)

      ... 28 more

 

PgmAegisContext is just a simple AegisContext, that adds one additional Type
to the list of known types.

Any hints/suggestions? Help greatly appreciated.

 

Chris

 

__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 3950
(20090320) __________

E-Mail wurde geprüft mit ESET NOD32 Antivirus.

http://www.eset.com
 
 

__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 3950
(20090320) __________

E-Mail wurde geprüft mit ESET NOD32 Antivirus.

http://www.eset.com
 

 

__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 3950
(20090320) __________

E-Mail wurde geprüft mit ESET NOD32 Antivirus.

http://www.eset.com
 
 

__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 3951
(20090320) __________

E-Mail wurde geprüft mit ESET NOD32 Antivirus.

http://www.eset.com
 


Mime
View raw message