You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by John Pederzolli <jp...@gmail.com> on 2007/06/13 17:54:58 UTC

Spring/CXF Client

I am trying to create a CXF client via the instructions found here:
http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html

When injecting the 'client' into the application, I get the error

Cannot convert value of type [$Proxy85] to required type
[demo.HelloWorldService]

How do I access the actual service interface via this proxy object?

Thanks 

- John


-- 
View this message in context: http://www.nabble.com/Spring-CXF-Client-tf3915636.html#a11102595
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Spring/CXF Client

Posted by John Pederzolli <jp...@gmail.com>.
I should say all dependencies are in a single war file...so they should be
using the same classloader...


John Pederzolli wrote:
> 
> Brice - Thanks for the reply. 
> 
> There is only a single classloader as this is running in a servlet
> container...
> 
> - John
> 
> 
> Brice Ruth wrote:
>> 
>> I may be off-base, but the times I've seen this happen its been because
>> there's a classloader mismatch - e.g. the classloader that setup the
>> Spring
>> context is not the classloader that loaded the class you're injecting
>> 'client' into. I've seen this type of error spit out (which is totally
>> misleading).
>> 
>> Is it possible that you have more than one classloader in play?
>> 
>> Cheers,
>> Brice
>> 
>> On 6/13/07, John Pederzolli <jp...@gmail.com> wrote:
>>>
>>>
>>> I am trying to create a CXF client via the instructions found here:
>>> http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html
>>>
>>> When injecting the 'client' into the application, I get the error
>>>
>>> Cannot convert value of type [$Proxy85] to required type
>>> [demo.HelloWorldService]
>>>
>>> How do I access the actual service interface via this proxy object?
>>>
>>> Thanks
>>>
>>> - John
>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Spring-CXF-Client-tf3915636.html#a11102595
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
>> -- 
>> Brice Ruth, FCD
>> Software Engineer, Madison WI
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Spring-CXF-Client-tf3915636.html#a11102930
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Spring/CXF Client

Posted by Brice Ruth <bd...@gmail.com>.
That's actually where its common to get multiple classloaders ;-) Especially
easy in something like JBoss. Are you running in a full J2EE container or
something more simple?

I see you just indicated everything's in a single .war ... so, nothing being
loaded from an .ear and a .war? Hrmpf ... that's stumping me. Maybe send
your .war along?

On 6/13/07, John Pederzolli <jp...@gmail.com> wrote:
>
>
> Brice - Thanks for the reply.
>
> There is only a single classloader as this is running in a servlet
> container...
>
> - John
>
>
> Brice Ruth wrote:
> >
> > I may be off-base, but the times I've seen this happen its been because
> > there's a classloader mismatch - e.g. the classloader that setup the
> > Spring
> > context is not the classloader that loaded the class you're injecting
> > 'client' into. I've seen this type of error spit out (which is totally
> > misleading).
> >
> > Is it possible that you have more than one classloader in play?
> >
> > Cheers,
> > Brice
> >
> > On 6/13/07, John Pederzolli <jp...@gmail.com> wrote:
> >>
> >>
> >> I am trying to create a CXF client via the instructions found here:
> >> http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html
> >>
> >> When injecting the 'client' into the application, I get the error
> >>
> >> Cannot convert value of type [$Proxy85] to required type
> >> [demo.HelloWorldService]
> >>
> >> How do I access the actual service interface via this proxy object?
> >>
> >> Thanks
> >>
> >> - John
> >>
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Spring-CXF-Client-tf3915636.html#a11102595
> >> Sent from the cxf-user mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Brice Ruth, FCD
> > Software Engineer, Madison WI
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Spring-CXF-Client-tf3915636.html#a11102841
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>


-- 
Brice Ruth, FCD
Software Engineer, Madison WI

Re: Spring/CXF Client

Posted by John Pederzolli <jp...@gmail.com>.
Brice - Thanks for the reply. 

There is only a single classloader as this is running in a servlet
container...

- John


Brice Ruth wrote:
> 
> I may be off-base, but the times I've seen this happen its been because
> there's a classloader mismatch - e.g. the classloader that setup the
> Spring
> context is not the classloader that loaded the class you're injecting
> 'client' into. I've seen this type of error spit out (which is totally
> misleading).
> 
> Is it possible that you have more than one classloader in play?
> 
> Cheers,
> Brice
> 
> On 6/13/07, John Pederzolli <jp...@gmail.com> wrote:
>>
>>
>> I am trying to create a CXF client via the instructions found here:
>> http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html
>>
>> When injecting the 'client' into the application, I get the error
>>
>> Cannot convert value of type [$Proxy85] to required type
>> [demo.HelloWorldService]
>>
>> How do I access the actual service interface via this proxy object?
>>
>> Thanks
>>
>> - John
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Spring-CXF-Client-tf3915636.html#a11102595
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Brice Ruth, FCD
> Software Engineer, Madison WI
> 
> 

-- 
View this message in context: http://www.nabble.com/Spring-CXF-Client-tf3915636.html#a11102841
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Spring/CXF Client

Posted by Brice Ruth <bd...@gmail.com>.
I may be off-base, but the times I've seen this happen its been because
there's a classloader mismatch - e.g. the classloader that setup the Spring
context is not the classloader that loaded the class you're injecting
'client' into. I've seen this type of error spit out (which is totally
misleading).

Is it possible that you have more than one classloader in play?

Cheers,
Brice

On 6/13/07, John Pederzolli <jp...@gmail.com> wrote:
>
>
> I am trying to create a CXF client via the instructions found here:
> http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html
>
> When injecting the 'client' into the application, I get the error
>
> Cannot convert value of type [$Proxy85] to required type
> [demo.HelloWorldService]
>
> How do I access the actual service interface via this proxy object?
>
> Thanks
>
> - John
>
>
> --
> View this message in context:
> http://www.nabble.com/Spring-CXF-Client-tf3915636.html#a11102595
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>


-- 
Brice Ruth, FCD
Software Engineer, Madison WI