You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by jbgill <jb...@q.com> on 2010/03/11 20:59:34 UTC

cxfse proxy injection in osgi-packaged cxfse service unit

Hi all,

In a JBI service assembly, based on the cxf-wsdl-first example, I have been
able to successfully use the <cxfse:proxy .... /> tag to inject a CXF proxy
into my cxfse service unit and call to another JBI endpoint with this proxy.

Now I am trying to do the exact same thing in an OSGI - packaged cxfse
service unit (based on the cxf-wsdl-first-osgi-package example) and am
getting an exception:  

"org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'context' is defined" 

when I deploy and it tries to inject the proxy.  Here is the relevant
excerpt from my beans.xml:

   <cxfse:endpoint>
        <cxfse:pojo>
          <bean class="org.apache.servicemix.samples.wsdl_first.PersonImpl"
>
            <property name="es">
              <cxfse:proxy service="bp:HelloPortTypeService"
context="#context" type="bpeltest.wsdl.HelloPortType"/>
            </property>
          </bean>
        </cxfse:pojo>
    </cxfse:endpoint>

What am I doing wrong?  How can I get the proxy injected with OSGI
packaging?  Is it even possible?

Thanks,
JB

-- 
View this message in context: http://old.nabble.com/cxfse-proxy-injection-in-osgi-packaged-cxfse-service-unit-tp27869007p27869007.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: cxfse proxy injection in osgi-packaged cxfse service unit

Posted by Freeman Fang <fr...@gmail.com>.
On 2010-3-12, at 下午11:01, jbgill wrote:

>
> Freeman,
>
> Thank you for the information!  I'll be happy to try it out on a 4.2
> snapshot build.  One question though - I can't seem to find a 4.2  
> snapshot
> build.  I am looking here and only see 4.1.0 as the latest snapshots:
>
> https://repository.apache.org/content/groups/snapshots-group/org/apache/servicemix/apache-servicemix/
>
> Is this what you meant?  If not, where do I get 4.2 snapshots?

Hi,

Yes, this what I mean. The naming convention for snapshot  version is  
always 4.odd_numer-SNAPSHOT but 4.even_nmer for release version. So  
4.1-SNAPSHOT for development snapshot and 4.2 for the release version.

But I just check the snapshot repo, the latest kit generated on Mar  
5th(as we are in release process now, so the nightly build isn't  
normal at this moment), which not pick up the my fix yet.

If you are eager to try it out, what I can suggest is download the  
latest snapshot kit from [1], and check out servicemix-cxf-se code  
from [2], build servicemix-cxf-se yourself, then you can override the  
servicemix-cxf-se-version*.jar in $SMX_HOME/system/... folder with the  
one you build yourself.

If you encounter any problem by this way, let me know.
[1]https://repository.apache.org/content/groups/snapshots-group/org/apache/servicemix/apache-servicemix/4.1.0-SNAPSHOT/
[1]https://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-cxf-se/trunk/


Freeman

>
> -JB
>
>
> Freeman Fang wrote:
>>
>> Hi,
>>
>> This is a known issue tracked by SMXCOMP-683 [1] and get fixed very
>> recently(This Monday).
>> So you need download latest 4.2 snapshot kit where servicemix-cxf-se
>> component already pick up this fix.
>>
>> You needn't add context="#context" anymore with this fix.
>> [1]https://issues.apache.org/activemq/browse/SMXCOMP-683
>>
>> Freeman
>> On 2010-3-12, at 上午3:59, jbgill wrote:
>>
>>>
>>> Hi all,
>>>
>>> In a JBI service assembly, based on the cxf-wsdl-first example, I
>>> have been
>>> able to successfully use the <cxfse:proxy .... /> tag to inject a
>>> CXF proxy
>>> into my cxfse service unit and call to another JBI endpoint with
>>> this proxy.
>>>
>>> Now I am trying to do the exact same thing in an OSGI - packaged  
>>> cxfse
>>> service unit (based on the cxf-wsdl-first-osgi-package example)  
>>> and am
>>> getting an exception:
>>>
>>> "org.springframework.beans.factory.NoSuchBeanDefinitionException: No
>>> bean
>>> named 'context' is defined"
>>>
>>> when I deploy and it tries to inject the proxy.  Here is the  
>>> relevant
>>> excerpt from my beans.xml:
>>>
>>>  <cxfse:endpoint>
>>>       <cxfse:pojo>
>>>         <bean
>>> class="org.apache.servicemix.samples.wsdl_first.PersonImpl"
>>>>
>>>           <property name="es">
>>>             <cxfse:proxy service="bp:HelloPortTypeService"
>>> context="#context" type="bpeltest.wsdl.HelloPortType"/>
>>>           </property>
>>>         </bean>
>>>       </cxfse:pojo>
>>>   </cxfse:endpoint>
>>>
>>> What am I doing wrong?  How can I get the proxy injected with OSGI
>>> packaging?  Is it even possible?
>>>
>>> Thanks,
>>> JB
>>>
>>> -- 
>>> View this message in context:
>>> http://old.nabble.com/cxfse-proxy-injection-in-osgi-packaged-cxfse-service-unit-tp27869007p27869007.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>
>>
>> -- 
>> Freeman Fang
>> ------------------------
>> Open Source SOA: http://fusesource.com
>>
>>
>>
>
> -- 
> View this message in context: http://old.nabble.com/cxfse-proxy-injection-in-osgi-packaged-cxfse-service-unit-tp27869007p27876069.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com


Re: cxfse proxy injection in osgi-packaged cxfse service unit

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

 From the exception you encountered, I'm quite sure that this fuse kit  
not pick up my fix yet.
So, try the solution I suggested in another mail.

Freeman
On 2010-3-13, at 上午4:16, jbgill wrote:

>
> OK, I found the 4.2 snapshot on the fusesource snapshot repository.  I
> downloaded and tried it and it appears to have gotten past the context
> problem, but now I am getting the following exception upon  
> deployment.  Is
> there something else I need to do?  Here's the exception:
>
> Error creating bean with name 'cxfse:proxy#32af89': FactoryBean threw
> exception on object creation; nested exception is
> org.apache.cxf.BusException: No conduit initiator was found for the
> namespace http://cxf.apache.org/transports/jbi.
>        at
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .BeanDefinitionValueResolver 
> .resolveInnerBean(BeanDefinitionValueResolver.java:230)
>        at
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .BeanDefinitionValueResolver 
> .resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
>        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)
>
> Any ideas?
>
> Thanks,
> JB
>
>
> jbgill wrote:
>>
>> Freeman,
>>
>> Thank you for the information!  I'll be happy to try it out on a 4.2
>> snapshot build.  One question though - I can't seem to find a 4.2  
>> snapshot
>> build.  I am looking here and only see 4.1.0 as the latest snapshots:
>>
>> https://repository.apache.org/content/groups/snapshots-group/org/apache/servicemix/apache-servicemix/
>>
>> Is this what you meant?  If not, where do I get 4.2 snapshots?
>>
>> -JB
>>
>>
>> Freeman Fang wrote:
>>>
>>> Hi,
>>>
>>> This is a known issue tracked by SMXCOMP-683 [1] and get fixed very
>>> recently(This Monday).
>>> So you need download latest 4.2 snapshot kit where servicemix-cxf-se
>>> component already pick up this fix.
>>>
>>> You needn't add context="#context" anymore with this fix.
>>> [1]https://issues.apache.org/activemq/browse/SMXCOMP-683
>>>
>>> Freeman
>>> On 2010-3-12, at 上午3:59, jbgill wrote:
>>>
>>>>
>>>> Hi all,
>>>>
>>>> In a JBI service assembly, based on the cxf-wsdl-first example, I
>>>> have been
>>>> able to successfully use the <cxfse:proxy .... /> tag to inject a
>>>> CXF proxy
>>>> into my cxfse service unit and call to another JBI endpoint with
>>>> this proxy.
>>>>
>>>> Now I am trying to do the exact same thing in an OSGI - packaged  
>>>> cxfse
>>>> service unit (based on the cxf-wsdl-first-osgi-package example)  
>>>> and am
>>>> getting an exception:
>>>>
>>>> "org.springframework.beans.factory.NoSuchBeanDefinitionException:  
>>>> No
>>>> bean
>>>> named 'context' is defined"
>>>>
>>>> when I deploy and it tries to inject the proxy.  Here is the  
>>>> relevant
>>>> excerpt from my beans.xml:
>>>>
>>>>  <cxfse:endpoint>
>>>>       <cxfse:pojo>
>>>>         <bean
>>>> class="org.apache.servicemix.samples.wsdl_first.PersonImpl"
>>>>>
>>>>           <property name="es">
>>>>             <cxfse:proxy service="bp:HelloPortTypeService"
>>>> context="#context" type="bpeltest.wsdl.HelloPortType"/>
>>>>           </property>
>>>>         </bean>
>>>>       </cxfse:pojo>
>>>>   </cxfse:endpoint>
>>>>
>>>> What am I doing wrong?  How can I get the proxy injected with OSGI
>>>> packaging?  Is it even possible?
>>>>
>>>> Thanks,
>>>> JB
>>>>
>>>> -- 
>>>> View this message in context:
>>>> http://old.nabble.com/cxfse-proxy-injection-in-osgi-packaged-cxfse-service-unit-tp27869007p27869007.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>> -- 
>>> Freeman Fang
>>> ------------------------
>>> Open Source SOA: http://fusesource.com
>>>
>>>
>>>
>>
>>
>
> -- 
> View this message in context: http://old.nabble.com/cxfse-proxy-injection-in-osgi-packaged-cxfse-service-unit-tp27869007p27882346.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com


Re: cxfse proxy injection in osgi-packaged cxfse service unit

Posted by jbgill <jb...@q.com>.
OK, I found the 4.2 snapshot on the fusesource snapshot repository.  I
downloaded and tried it and it appears to have gotten past the context
problem, but now I am getting the following exception upon deployment.  Is
there something else I need to do?  Here's the exception:

Error creating bean with name 'cxfse:proxy#32af89': FactoryBean threw
exception on object creation; nested exception is
org.apache.cxf.BusException: No conduit initiator was found for the
namespace http://cxf.apache.org/transports/jbi.                                                                                                                   
        at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
        at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
        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)

Any ideas?

Thanks, 
JB


jbgill wrote:
> 
> Freeman,
> 
> Thank you for the information!  I'll be happy to try it out on a 4.2
> snapshot build.  One question though - I can't seem to find a 4.2 snapshot
> build.  I am looking here and only see 4.1.0 as the latest snapshots:
> 
> https://repository.apache.org/content/groups/snapshots-group/org/apache/servicemix/apache-servicemix/
> 
> Is this what you meant?  If not, where do I get 4.2 snapshots?
> 
> -JB
> 
> 
> Freeman Fang wrote:
>> 
>> Hi,
>> 
>> This is a known issue tracked by SMXCOMP-683 [1] and get fixed very  
>> recently(This Monday).
>> So you need download latest 4.2 snapshot kit where servicemix-cxf-se  
>> component already pick up this fix.
>> 
>> You needn't add context="#context" anymore with this fix.
>> [1]https://issues.apache.org/activemq/browse/SMXCOMP-683
>> 
>> Freeman
>> On 2010-3-12, at 上午3:59, jbgill wrote:
>> 
>>>
>>> Hi all,
>>>
>>> In a JBI service assembly, based on the cxf-wsdl-first example, I  
>>> have been
>>> able to successfully use the <cxfse:proxy .... /> tag to inject a  
>>> CXF proxy
>>> into my cxfse service unit and call to another JBI endpoint with  
>>> this proxy.
>>>
>>> Now I am trying to do the exact same thing in an OSGI - packaged cxfse
>>> service unit (based on the cxf-wsdl-first-osgi-package example) and am
>>> getting an exception:
>>>
>>> "org.springframework.beans.factory.NoSuchBeanDefinitionException: No  
>>> bean
>>> named 'context' is defined"
>>>
>>> when I deploy and it tries to inject the proxy.  Here is the relevant
>>> excerpt from my beans.xml:
>>>
>>>   <cxfse:endpoint>
>>>        <cxfse:pojo>
>>>          <bean  
>>> class="org.apache.servicemix.samples.wsdl_first.PersonImpl"
>>>>
>>>            <property name="es">
>>>              <cxfse:proxy service="bp:HelloPortTypeService"
>>> context="#context" type="bpeltest.wsdl.HelloPortType"/>
>>>            </property>
>>>          </bean>
>>>        </cxfse:pojo>
>>>    </cxfse:endpoint>
>>>
>>> What am I doing wrong?  How can I get the proxy injected with OSGI
>>> packaging?  Is it even possible?
>>>
>>> Thanks,
>>> JB
>>>
>>> -- 
>>> View this message in context:
>>> http://old.nabble.com/cxfse-proxy-injection-in-osgi-packaged-cxfse-service-unit-tp27869007p27869007.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>> 
>> 
>> -- 
>> Freeman Fang
>> ------------------------
>> Open Source SOA: http://fusesource.com
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/cxfse-proxy-injection-in-osgi-packaged-cxfse-service-unit-tp27869007p27882346.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: cxfse proxy injection in osgi-packaged cxfse service unit

Posted by jbgill <jb...@q.com>.
Freeman,

Thank you for the information!  I'll be happy to try it out on a 4.2
snapshot build.  One question though - I can't seem to find a 4.2 snapshot
build.  I am looking here and only see 4.1.0 as the latest snapshots:

https://repository.apache.org/content/groups/snapshots-group/org/apache/servicemix/apache-servicemix/

Is this what you meant?  If not, where do I get 4.2 snapshots?

-JB


Freeman Fang wrote:
> 
> Hi,
> 
> This is a known issue tracked by SMXCOMP-683 [1] and get fixed very  
> recently(This Monday).
> So you need download latest 4.2 snapshot kit where servicemix-cxf-se  
> component already pick up this fix.
> 
> You needn't add context="#context" anymore with this fix.
> [1]https://issues.apache.org/activemq/browse/SMXCOMP-683
> 
> Freeman
> On 2010-3-12, at 上午3:59, jbgill wrote:
> 
>>
>> Hi all,
>>
>> In a JBI service assembly, based on the cxf-wsdl-first example, I  
>> have been
>> able to successfully use the <cxfse:proxy .... /> tag to inject a  
>> CXF proxy
>> into my cxfse service unit and call to another JBI endpoint with  
>> this proxy.
>>
>> Now I am trying to do the exact same thing in an OSGI - packaged cxfse
>> service unit (based on the cxf-wsdl-first-osgi-package example) and am
>> getting an exception:
>>
>> "org.springframework.beans.factory.NoSuchBeanDefinitionException: No  
>> bean
>> named 'context' is defined"
>>
>> when I deploy and it tries to inject the proxy.  Here is the relevant
>> excerpt from my beans.xml:
>>
>>   <cxfse:endpoint>
>>        <cxfse:pojo>
>>          <bean  
>> class="org.apache.servicemix.samples.wsdl_first.PersonImpl"
>>>
>>            <property name="es">
>>              <cxfse:proxy service="bp:HelloPortTypeService"
>> context="#context" type="bpeltest.wsdl.HelloPortType"/>
>>            </property>
>>          </bean>
>>        </cxfse:pojo>
>>    </cxfse:endpoint>
>>
>> What am I doing wrong?  How can I get the proxy injected with OSGI
>> packaging?  Is it even possible?
>>
>> Thanks,
>> JB
>>
>> -- 
>> View this message in context:
>> http://old.nabble.com/cxfse-proxy-injection-in-osgi-packaged-cxfse-service-unit-tp27869007p27869007.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
> 
> 
> -- 
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/cxfse-proxy-injection-in-osgi-packaged-cxfse-service-unit-tp27869007p27876069.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: cxfse proxy injection in osgi-packaged cxfse service unit

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

This is a known issue tracked by SMXCOMP-683 [1] and get fixed very  
recently(This Monday).
So you need download latest 4.2 snapshot kit where servicemix-cxf-se  
component already pick up this fix.

You needn't add context="#context" anymore with this fix.
[1]https://issues.apache.org/activemq/browse/SMXCOMP-683

Freeman
On 2010-3-12, at 上午3:59, jbgill wrote:

>
> Hi all,
>
> In a JBI service assembly, based on the cxf-wsdl-first example, I  
> have been
> able to successfully use the <cxfse:proxy .... /> tag to inject a  
> CXF proxy
> into my cxfse service unit and call to another JBI endpoint with  
> this proxy.
>
> Now I am trying to do the exact same thing in an OSGI - packaged cxfse
> service unit (based on the cxf-wsdl-first-osgi-package example) and am
> getting an exception:
>
> "org.springframework.beans.factory.NoSuchBeanDefinitionException: No  
> bean
> named 'context' is defined"
>
> when I deploy and it tries to inject the proxy.  Here is the relevant
> excerpt from my beans.xml:
>
>   <cxfse:endpoint>
>        <cxfse:pojo>
>          <bean  
> class="org.apache.servicemix.samples.wsdl_first.PersonImpl"
>>
>            <property name="es">
>              <cxfse:proxy service="bp:HelloPortTypeService"
> context="#context" type="bpeltest.wsdl.HelloPortType"/>
>            </property>
>          </bean>
>        </cxfse:pojo>
>    </cxfse:endpoint>
>
> What am I doing wrong?  How can I get the proxy injected with OSGI
> packaging?  Is it even possible?
>
> Thanks,
> JB
>
> -- 
> View this message in context: http://old.nabble.com/cxfse-proxy-injection-in-osgi-packaged-cxfse-service-unit-tp27869007p27869007.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com