You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by RuneB <ru...@spk.no> on 2009/09/04 15:50:36 UTC

Re: Problem with client side cxf:bus after upgrading from 2.2 to 2.2.3

Well, at least not for CXF itself. These are the jars:

cxf-api-2.2.3.jar
cxf-common-schemas-2.2.3.jar
cxf-common-utilities-2.2.3.jar
cxf-rt-bindings-soap-2.2.3.jar
cxf-rt-bindings-xml-2.2.3.jar
cxf-rt-core-2.2.3.jar
cxf-rt-databinding-jaxb-2.2.3.jar
cxf-rt-frontend-jaxws-2.2.3.jar
cxf-rt-frontend-simple-2.2.3.jar
cxf-rt-transports-http-2.2.3.jar
cxf-rt-ws-addr-2.2.3.jar
cxf-rt-ws-security-2.2.3.jar
cxf-tools-common-2.2.3.jar

Also, I've found that the problem does not occur when the client is within a
web-app. 
The problem only occurs when the Spring context is created for a junit-test,
or for a Fitnesse test.



bimargulies wrote:
> 
> A mixture of jars from two different releases?
> 
> On Fri, Sep 4, 2009 at 8:39 AM, RuneB <ru...@spk.no> wrote:
> 
>>
>> After upgrading from 2.2 to 2.2.3, the presence of the following in our
>> client side context:
>>
>>        <cxf:bus>
>>                <cxf:inInterceptors>
>>                        <ref bean="logInbound" />
>>                </cxf:inInterceptors>
>>                <cxf:outInterceptors>
>>                        <ref bean="logOutbound" />
>>                </cxf:outInterceptors>
>>                <cxf:inFaultInterceptors>
>>                        <ref bean="logOutbound" />
>>                </cxf:inFaultInterceptors>
>>        </cxf:bus>
>>
>> causes the this to happen when the context gets createt:
>>
>>        Caused by:
>> org.springframework.beans.factory.BeanCreationException:
>> Error
>> creating bean with name 'cxf.config': Instantiation of bean failed;
>> nested
>> exception is org.springframework.beans.BeanInstantiationException: Could
>> not
>> instantiate bean class
>> [org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig]: No default
>> constructor found; nested exception is java.lang.NoSuchMethodException:
>> org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig.<init>()
>>                at
>>
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
>>                at
>>
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
>>                at
>>
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
>>                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(AbstractBeanFactory.java:264)
>>                at
>>
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>>                at
>>
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
>>                at
>>
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
>>                at
>>
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
>>                at
>>
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
>>                at
>>
>> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
>>                at
>>
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
>>                at
>>
>> org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84)
>>                at
>>
>> org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:42)
>>                at
>>
>> org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:173)
>>                at
>>
>> org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:197)
>>                ... 21 more
>>        Caused by: org.springframework.beans.BeanInstantiationException:
>> Could not
>> instantiate bean class
>> [org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig]: No default
>> constructor found; nested exception is java.lang.NoSuchMethodException:
>> org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig.<init>()
>>                at
>>
>> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:58)
>>                at
>>
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
>>                ... 38 more
>>        Caused by: java.lang.NoSuchMethodException:
>> org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig.<init>()
>>                at java.lang.Class.getConstructor0(Class.java:2678)
>>                at java.lang.Class.getDeclaredConstructor(Class.java:1953)
>>                at
>>
>> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:54)
>>                ... 39 more
>>
>>
>> Anyone know what might be causing this problem?
>>
>> - Rune
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-with-client-side-cxf%3Abus-after-upgrading-from-2.2-to-2.2.3-tp25293610p25293610.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-client-side-cxf%3Abus-after-upgrading-from-2.2-to-2.2.3-tp25293610p25294707.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Problem with client side cxf:bus after upgrading from 2.2 to 2.2.3

Posted by Daniel Kulp <dk...@apache.org>.
Thanks for the test case.

I'm actually surprised this has ever worked.  Or, more specifically, ever 
produced a bus that is actually usable for anything other than holding onto 
those couple of interceptors.   For example, if you change your testcase to 
do:

    @Autowired
    ApplicationContext ctx;
    
    @Test
    public void testMe() throws Exception {
        Assert.assertNotNull(ctx);
        
        Object o = ctx.getBean("cxf");
        Assert.assertNotNull(o);
        System.out.println(o);
        Bus bus = (Bus)o;
        
        System.out.println(bus.getExtension(WSDLManager.class));
    }

You'll see the second println is null which basically says the bus doesn't 
have any useful extensions configured in, which, for the most part, means the 
bus is useless.    In anycase, I'm testing a fix that would allow this style 
of config by grabbing a default bus (which WOULD be properly/fully configured) 
and add the interceptors to it.   Thus, this will work differently than 2.2, 
but I think it's more correct.

The actual proper way would be to add:

<import resource="classpath:META-INF/cxf/cxf.xml" />
to load the cxf bus definitions, then also add the various components you 
really need:
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
etc....


Dan




On Mon September 7 2009 6:12:20 am RuneB wrote:
> Ok, here's a minimal project with a junit test that demonstrates the
>  problem. Just run: mvn test
> 
> Reverting the CXF version to 2.2 makes the problem go away.
> 
> - Rune
> 
> dkulp wrote:
> > Well, that's interesting.   Any chance you can create a small testcase
> > and send it along?
> >
> > You may also be able to get around it by doing:
> > <cxf:bus bus="cxf">
> > as that would force the contructor arg.
> >
> > However, I'd REALLY like to get a test case if at all possible.   We use
> > this
> > same syntax in MAY of our own unit tests so I'm not sure what could
> > possibly
> > be going wrong.
> >
> > Dan
> 
> http://www.nabble.com/file/p25328146/cxf-bus-bug.zip cxf-bus-bug.zip
> 

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: Problem with client side cxf:bus after upgrading from 2.2 to 2.2.3

Posted by RuneB <ru...@spk.no>.
Ok, here's a minimal project with a junit test that demonstrates the problem.
Just run: mvn test

Reverting the CXF version to 2.2 makes the problem go away.

- Rune


dkulp wrote:
> 
> 
> Well, that's interesting.   Any chance you can create a small testcase and 
> send it along?
> 
> You may also be able to get around it by doing:
> <cxf:bus bus="cxf">
> as that would force the contructor arg.   
> 
> However, I'd REALLY like to get a test case if at all possible.   We use
> this 
> same syntax in MAY of our own unit tests so I'm not sure what could
> possibly 
> be going wrong.
> 
> Dan
> 
http://www.nabble.com/file/p25328146/cxf-bus-bug.zip cxf-bus-bug.zip 
-- 
View this message in context: http://www.nabble.com/Problem-with-client-side-cxf%3Abus-after-upgrading-from-2.2-to-2.2.3-tp25293610p25328146.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Problem with client side cxf:bus after upgrading from 2.2 to 2.2.3

Posted by nicolas de loof <ni...@gmail.com>.
I have the same issue running cxf as client SOAP stack in a (tomcat-based)
webapp.

2009/9/4 RuneB <ru...@spk.no>

>
> I'll see if I can produce a scaled down test case.
>
> Meanwhile, the bus attribute you suggest doesn't seem to be allowed (acc.
> to
> http://cxf.apache.org/schemas/configuration/cxf-beans.xsd) ...
>
> - Rune
>
>
> dkulp wrote:
> >
> >
> > Well, that's interesting.   Any chance you can create a small testcase
> and
> > send it along?
> >
> > You may also be able to get around it by doing:
> > <cxf:bus bus="cxf">
> > as that would force the contructor arg.
> >
> > However, I'd REALLY like to get a test case if at all possible.   We use
> > this
> > same syntax in MAY of our own unit tests so I'm not sure what could
> > possibly
> > be going wrong.
> >
> >
> > Dan
> >
> >
> > On Fri September 4 2009 9:50:36 am RuneB wrote:
> >> Well, at least not for CXF itself. These are the jars:
> >>
> >> cxf-api-2.2.3.jar
> >> cxf-common-schemas-2.2.3.jar
> >> cxf-common-utilities-2.2.3.jar
> >> cxf-rt-bindings-soap-2.2.3.jar
> >> cxf-rt-bindings-xml-2.2.3.jar
> >> cxf-rt-core-2.2.3.jar
> >> cxf-rt-databinding-jaxb-2.2.3.jar
> >> cxf-rt-frontend-jaxws-2.2.3.jar
> >> cxf-rt-frontend-simple-2.2.3.jar
> >> cxf-rt-transports-http-2.2.3.jar
> >> cxf-rt-ws-addr-2.2.3.jar
> >> cxf-rt-ws-security-2.2.3.jar
> >> cxf-tools-common-2.2.3.jar
> >>
> >> Also, I've found that the problem does not occur when the client is
> >> within
> >>  a web-app.
> >> The problem only occurs when the Spring context is created for a
> >>  junit-test, or for a Fitnesse test.
> >>
> >> bimargulies wrote:
> >> > A mixture of jars from two different releases?
> >> >
> >> > On Fri, Sep 4, 2009 at 8:39 AM, RuneB <ru...@spk.no> wrote:
> >> >> After upgrading from 2.2 to 2.2.3, the presence of the following in
> >> our
> >> >> client side context:
> >> >>
> >> >>        <cxf:bus>
> >> >>                <cxf:inInterceptors>
> >> >>                        <ref bean="logInbound" />
> >> >>                </cxf:inInterceptors>
> >> >>                <cxf:outInterceptors>
> >> >>                        <ref bean="logOutbound" />
> >> >>                </cxf:outInterceptors>
> >> >>                <cxf:inFaultInterceptors>
> >> >>                        <ref bean="logOutbound" />
> >> >>                </cxf:inFaultInterceptors>
> >> >>        </cxf:bus>
> >> >>
> >> >> causes the this to happen when the context gets createt:
> >> >>
> >> >>        Caused by:
> >> >> org.springframework.beans.factory.BeanCreationException:
> >> >> Error
> >> >> creating bean with name 'cxf.config': Instantiation of bean failed;
> >> >> nested
> >> >> exception is org.springframework.beans.BeanInstantiationException:
> >> Could
> >> >> not
> >> >> instantiate bean class
> >> >> [org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig]: No default
> >> >> constructor found; nested exception is
> >> java.lang.NoSuchMethodException:
> >> >> org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig.<init>()
> >> >>                at
> >> >>
> >> >>
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> >> >>tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883) at
> >> >>
> >> >>
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> >> >>tory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
> at
> >> >>
> >> >>
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> >> >>tory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) at
> >> >>
> >> >>
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> >> >>tory$1.run(AbstractAutowireCapableBeanFactory.java:409) at
> >> >> java.security.AccessController.doPrivileged(Native Method)
> >> >>                at
> >> >>
> >> >>
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> >> >>tory.createBean(AbstractAutowireCapableBeanFactory.java:380) at
> >> >>
> >> >>
> >> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
> >> >>t(AbstractBeanFactory.java:264) at
> >> >>
> >> >>
> >> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
> >> >>etSingleton(DefaultSingletonBeanRegistry.java:222) at
> >> >>
> >> >>
> >> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(
> >> >>AbstractBeanFactory.java:261) at
> >> >>
> >> >>
> >> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
> >> >>stractBeanFactory.java:185) at
> >> >>
> >> >>
> >> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
> >> >>stractBeanFactory.java:164) at
> >> >>
> >> >>
> >> org.springframework.beans.factory.support.DefaultListableBeanFactory.pre
> >> >>InstantiateSingletons(DefaultListableBeanFactory.java:429) at
> >> >>
> >> >>
> >> org.springframework.context.support.AbstractApplicationContext.finishBea
> >> >>nFactoryInitialization(AbstractApplicationContext.java:728) at
> >> >>
> >> >>
> >> org.springframework.context.support.AbstractApplicationContext.refresh(A
> >> >>bstractApplicationContext.java:380) at
> >> >>
> >> >>
> >> org.springframework.test.context.support.AbstractGenericContextLoader.lo
> >> >>adContext(AbstractGenericContextLoader.java:84) at
> >> >>
> >> >>
> >> org.springframework.test.context.support.AbstractGenericContextLoader.lo
> >> >>adContext(AbstractGenericContextLoader.java:42) at
> >> >>
> >> >>
> >> org.springframework.test.context.TestContext.loadApplicationContext(Test
> >> >>Context.java:173) at
> >> >>
> >> >>
> >> org.springframework.test.context.TestContext.getApplicationContext(TestC
> >> >>ontext.java:197) ... 21 more
> >> >>        Caused by:
> >> org.springframework.beans.BeanInstantiationException:
> >> >> Could not
> >> >> instantiate bean class
> >> >> [org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig]: No default
> >> >> constructor found; nested exception is
> >> java.lang.NoSuchMethodException:
> >> >> org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig.<init>()
> >> >>                at
> >> >>
> >> >>
> >>
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.in
> >> >>stantiate(SimpleInstantiationStrategy.java:58) at
> >> >>
> >> >>
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> >> >>tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877) ...
> >> 38
> >> >> more
> >> >>        Caused by: java.lang.NoSuchMethodException:
> >> >> org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig.<init>()
> >> >>                at java.lang.Class.getConstructor0(Class.java:2678)
> >> >>                at
> >> >> java.lang.Class.getDeclaredConstructor(Class.java:1953) at
> >> >>
> >> >>
> >>
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.in
> >> >>stantiate(SimpleInstantiationStrategy.java:54) ... 39 more
> >> >>
> >> >>
> >> >> Anyone know what might be causing this problem?
> >> >>
> >> >> - Rune
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://www.nabble.com/Problem-with-client-side-cxf%3Abus-after-upgrading
> >> >>-from-2.2-to-2.2.3-tp25293610p25293610.html Sent from the cxf-user
> >> >> mailing list archive at Nabble.com.
> >>
> >
> > --
> > Daniel Kulp
> > dkulp@apache.org
> > http://www.dankulp.com/blog
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Problem-with-client-side-cxf%3Abus-after-upgrading-from-2.2-to-2.2.3-tp25293610p25295188.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: Problem with client side cxf:bus after upgrading from 2.2 to 2.2.3

Posted by RuneB <ru...@spk.no>.
I'll see if I can produce a scaled down test case.

Meanwhile, the bus attribute you suggest doesn't seem to be allowed (acc. to
http://cxf.apache.org/schemas/configuration/cxf-beans.xsd) ...

- Rune


dkulp wrote:
> 
> 
> Well, that's interesting.   Any chance you can create a small testcase and 
> send it along?
> 
> You may also be able to get around it by doing:
> <cxf:bus bus="cxf">
> as that would force the contructor arg.   
> 
> However, I'd REALLY like to get a test case if at all possible.   We use
> this 
> same syntax in MAY of our own unit tests so I'm not sure what could
> possibly 
> be going wrong.
> 
> 
> Dan
> 
> 
> On Fri September 4 2009 9:50:36 am RuneB wrote:
>> Well, at least not for CXF itself. These are the jars:
>> 
>> cxf-api-2.2.3.jar
>> cxf-common-schemas-2.2.3.jar
>> cxf-common-utilities-2.2.3.jar
>> cxf-rt-bindings-soap-2.2.3.jar
>> cxf-rt-bindings-xml-2.2.3.jar
>> cxf-rt-core-2.2.3.jar
>> cxf-rt-databinding-jaxb-2.2.3.jar
>> cxf-rt-frontend-jaxws-2.2.3.jar
>> cxf-rt-frontend-simple-2.2.3.jar
>> cxf-rt-transports-http-2.2.3.jar
>> cxf-rt-ws-addr-2.2.3.jar
>> cxf-rt-ws-security-2.2.3.jar
>> cxf-tools-common-2.2.3.jar
>> 
>> Also, I've found that the problem does not occur when the client is
>> within
>>  a web-app.
>> The problem only occurs when the Spring context is created for a
>>  junit-test, or for a Fitnesse test.
>> 
>> bimargulies wrote:
>> > A mixture of jars from two different releases?
>> >
>> > On Fri, Sep 4, 2009 at 8:39 AM, RuneB <ru...@spk.no> wrote:
>> >> After upgrading from 2.2 to 2.2.3, the presence of the following in
>> our
>> >> client side context:
>> >>
>> >>        <cxf:bus>
>> >>                <cxf:inInterceptors>
>> >>                        <ref bean="logInbound" />
>> >>                </cxf:inInterceptors>
>> >>                <cxf:outInterceptors>
>> >>                        <ref bean="logOutbound" />
>> >>                </cxf:outInterceptors>
>> >>                <cxf:inFaultInterceptors>
>> >>                        <ref bean="logOutbound" />
>> >>                </cxf:inFaultInterceptors>
>> >>        </cxf:bus>
>> >>
>> >> causes the this to happen when the context gets createt:
>> >>
>> >>        Caused by:
>> >> org.springframework.beans.factory.BeanCreationException:
>> >> Error
>> >> creating bean with name 'cxf.config': Instantiation of bean failed;
>> >> nested
>> >> exception is org.springframework.beans.BeanInstantiationException:
>> Could
>> >> not
>> >> instantiate bean class
>> >> [org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig]: No default
>> >> constructor found; nested exception is
>> java.lang.NoSuchMethodException:
>> >> org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig.<init>()
>> >>                at
>> >>
>> >>
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> >>tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883) at
>> >>
>> >>
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> >>tory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839) at
>> >>
>> >>
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> >>tory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) at
>> >>
>> >>
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> >>tory$1.run(AbstractAutowireCapableBeanFactory.java:409) at
>> >> java.security.AccessController.doPrivileged(Native Method)
>> >>                at
>> >>
>> >>
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> >>tory.createBean(AbstractAutowireCapableBeanFactory.java:380) at
>> >>
>> >>
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
>> >>t(AbstractBeanFactory.java:264) at
>> >>
>> >>
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
>> >>etSingleton(DefaultSingletonBeanRegistry.java:222) at
>> >>
>> >>
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(
>> >>AbstractBeanFactory.java:261) at
>> >>
>> >>
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
>> >>stractBeanFactory.java:185) at
>> >>
>> >>
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
>> >>stractBeanFactory.java:164) at
>> >>
>> >>
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.pre
>> >>InstantiateSingletons(DefaultListableBeanFactory.java:429) at
>> >>
>> >>
>> org.springframework.context.support.AbstractApplicationContext.finishBea
>> >>nFactoryInitialization(AbstractApplicationContext.java:728) at
>> >>
>> >>
>> org.springframework.context.support.AbstractApplicationContext.refresh(A
>> >>bstractApplicationContext.java:380) at
>> >>
>> >>
>> org.springframework.test.context.support.AbstractGenericContextLoader.lo
>> >>adContext(AbstractGenericContextLoader.java:84) at
>> >>
>> >>
>> org.springframework.test.context.support.AbstractGenericContextLoader.lo
>> >>adContext(AbstractGenericContextLoader.java:42) at
>> >>
>> >>
>> org.springframework.test.context.TestContext.loadApplicationContext(Test
>> >>Context.java:173) at
>> >>
>> >>
>> org.springframework.test.context.TestContext.getApplicationContext(TestC
>> >>ontext.java:197) ... 21 more
>> >>        Caused by:
>> org.springframework.beans.BeanInstantiationException:
>> >> Could not
>> >> instantiate bean class
>> >> [org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig]: No default
>> >> constructor found; nested exception is
>> java.lang.NoSuchMethodException:
>> >> org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig.<init>()
>> >>                at
>> >>
>> >>
>> org.springframework.beans.factory.support.SimpleInstantiationStrategy.in
>> >>stantiate(SimpleInstantiationStrategy.java:58) at
>> >>
>> >>
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> >>tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877) ...
>> 38
>> >> more
>> >>        Caused by: java.lang.NoSuchMethodException:
>> >> org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig.<init>()
>> >>                at java.lang.Class.getConstructor0(Class.java:2678)
>> >>                at
>> >> java.lang.Class.getDeclaredConstructor(Class.java:1953) at
>> >>
>> >>
>> org.springframework.beans.factory.support.SimpleInstantiationStrategy.in
>> >>stantiate(SimpleInstantiationStrategy.java:54) ... 39 more
>> >>
>> >>
>> >> Anyone know what might be causing this problem?
>> >>
>> >> - Rune
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Problem-with-client-side-cxf%3Abus-after-upgrading
>> >>-from-2.2-to-2.2.3-tp25293610p25293610.html Sent from the cxf-user
>> >> mailing list archive at Nabble.com.
>> 
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-client-side-cxf%3Abus-after-upgrading-from-2.2-to-2.2.3-tp25293610p25295188.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Problem with client side cxf:bus after upgrading from 2.2 to 2.2.3

Posted by Daniel Kulp <dk...@apache.org>.
Well, that's interesting.   Any chance you can create a small testcase and 
send it along?

You may also be able to get around it by doing:
<cxf:bus bus="cxf">
as that would force the contructor arg.   

However, I'd REALLY like to get a test case if at all possible.   We use this 
same syntax in MAY of our own unit tests so I'm not sure what could possibly 
be going wrong.


Dan


On Fri September 4 2009 9:50:36 am RuneB wrote:
> Well, at least not for CXF itself. These are the jars:
> 
> cxf-api-2.2.3.jar
> cxf-common-schemas-2.2.3.jar
> cxf-common-utilities-2.2.3.jar
> cxf-rt-bindings-soap-2.2.3.jar
> cxf-rt-bindings-xml-2.2.3.jar
> cxf-rt-core-2.2.3.jar
> cxf-rt-databinding-jaxb-2.2.3.jar
> cxf-rt-frontend-jaxws-2.2.3.jar
> cxf-rt-frontend-simple-2.2.3.jar
> cxf-rt-transports-http-2.2.3.jar
> cxf-rt-ws-addr-2.2.3.jar
> cxf-rt-ws-security-2.2.3.jar
> cxf-tools-common-2.2.3.jar
> 
> Also, I've found that the problem does not occur when the client is within
>  a web-app.
> The problem only occurs when the Spring context is created for a
>  junit-test, or for a Fitnesse test.
> 
> bimargulies wrote:
> > A mixture of jars from two different releases?
> >
> > On Fri, Sep 4, 2009 at 8:39 AM, RuneB <ru...@spk.no> wrote:
> >> After upgrading from 2.2 to 2.2.3, the presence of the following in our
> >> client side context:
> >>
> >>        <cxf:bus>
> >>                <cxf:inInterceptors>
> >>                        <ref bean="logInbound" />
> >>                </cxf:inInterceptors>
> >>                <cxf:outInterceptors>
> >>                        <ref bean="logOutbound" />
> >>                </cxf:outInterceptors>
> >>                <cxf:inFaultInterceptors>
> >>                        <ref bean="logOutbound" />
> >>                </cxf:inFaultInterceptors>
> >>        </cxf:bus>
> >>
> >> causes the this to happen when the context gets createt:
> >>
> >>        Caused by:
> >> org.springframework.beans.factory.BeanCreationException:
> >> Error
> >> creating bean with name 'cxf.config': Instantiation of bean failed;
> >> nested
> >> exception is org.springframework.beans.BeanInstantiationException: Could
> >> not
> >> instantiate bean class
> >> [org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig]: No default
> >> constructor found; nested exception is java.lang.NoSuchMethodException:
> >> org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig.<init>()
> >>                at
> >>
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> >>tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883) at
> >>
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> >>tory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839) at
> >>
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> >>tory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) at
> >>
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> >>tory$1.run(AbstractAutowireCapableBeanFactory.java:409) at
> >> java.security.AccessController.doPrivileged(Native Method)
> >>                at
> >>
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> >>tory.createBean(AbstractAutowireCapableBeanFactory.java:380) at
> >>
> >> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
> >>t(AbstractBeanFactory.java:264) at
> >>
> >> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
> >>etSingleton(DefaultSingletonBeanRegistry.java:222) at
> >>
> >> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(
> >>AbstractBeanFactory.java:261) at
> >>
> >> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
> >>stractBeanFactory.java:185) at
> >>
> >> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
> >>stractBeanFactory.java:164) at
> >>
> >> org.springframework.beans.factory.support.DefaultListableBeanFactory.pre
> >>InstantiateSingletons(DefaultListableBeanFactory.java:429) at
> >>
> >> org.springframework.context.support.AbstractApplicationContext.finishBea
> >>nFactoryInitialization(AbstractApplicationContext.java:728) at
> >>
> >> org.springframework.context.support.AbstractApplicationContext.refresh(A
> >>bstractApplicationContext.java:380) at
> >>
> >> org.springframework.test.context.support.AbstractGenericContextLoader.lo
> >>adContext(AbstractGenericContextLoader.java:84) at
> >>
> >> org.springframework.test.context.support.AbstractGenericContextLoader.lo
> >>adContext(AbstractGenericContextLoader.java:42) at
> >>
> >> org.springframework.test.context.TestContext.loadApplicationContext(Test
> >>Context.java:173) at
> >>
> >> org.springframework.test.context.TestContext.getApplicationContext(TestC
> >>ontext.java:197) ... 21 more
> >>        Caused by: org.springframework.beans.BeanInstantiationException:
> >> Could not
> >> instantiate bean class
> >> [org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig]: No default
> >> constructor found; nested exception is java.lang.NoSuchMethodException:
> >> org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig.<init>()
> >>                at
> >>
> >> org.springframework.beans.factory.support.SimpleInstantiationStrategy.in
> >>stantiate(SimpleInstantiationStrategy.java:58) at
> >>
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> >>tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877) ... 38
> >> more
> >>        Caused by: java.lang.NoSuchMethodException:
> >> org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig.<init>()
> >>                at java.lang.Class.getConstructor0(Class.java:2678)
> >>                at
> >> java.lang.Class.getDeclaredConstructor(Class.java:1953) at
> >>
> >> org.springframework.beans.factory.support.SimpleInstantiationStrategy.in
> >>stantiate(SimpleInstantiationStrategy.java:54) ... 39 more
> >>
> >>
> >> Anyone know what might be causing this problem?
> >>
> >> - Rune
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Problem-with-client-side-cxf%3Abus-after-upgrading
> >>-from-2.2-to-2.2.3-tp25293610p25293610.html Sent from the cxf-user
> >> mailing list archive at Nabble.com.
> 

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog