You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by bisior <lu...@vsoft.pl> on 2010/12/21 11:50:19 UTC

CXF 3.1 in OSGi container (equinox)

Hi,

Can someone explain me how to run CXF 3.1 in OSGi container? The manifest of
cxf-2.3.1.jar looks OK, but there are a lot of missing libraries in the lib
directory of the distribution. Finally I have managed to find and resolve
all missing constraints, but then CXF had some class loading issues.

Maybe CXF is not supporting OSGi fully at the moment? If it suports OSGi
some tutorial is must have thing for the developers.

BR,
Łukasz
-- 
View this message in context: http://cxf.547215.n5.nabble.com/CXF-3-1-in-OSGi-container-equinox-tp3313313p3313313.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Re: CXF 3.1 in OSGi container (equinox)

Posted by Willem Jiang <wi...@gmail.com>.
To get all the CXF dependencies bundles to be OSGi ready is not an easy 
thing, that is why ServiceMix spends lots of time to wrap the bundles 
itself.

By using these bundles with Karaf will save lots of your time, and with 
the Service CXF features you can install these bundles just by typing a 
simple command line as Freeman had said before.

Willem
On 12/22/10 3:28 PM, Christian Schneider wrote:
> I read some days ago on Dan Kulp´s blog that Talend released the first
> version of Talend Service Factory.
> http://www.dankulp.com/blog/?p=285
>
> The interesting thing for you is that it contains a complete osgi
> container with Karaf and all dependencies for CXF.
> That should make it much easier for you.
>
> I also struggled for a while to get CXF running in an Eclipse RCP
> GUI. From what I learned you need the osgi ready dependencies and you
> also have to tune the
> starter as CXF needs some more current libs of java apis on the boot
> class path.
> (also see:
> http://blog.springsource.com/2009/01/19/exposing-the-boot-classpath-in-osgi/)
>
>
> Best regards
>
> Christian
>
> Am 21.12.2010 11:50, schrieb bisior:
>> Hi,
>>
>> Can someone explain me how to run CXF 3.1 in OSGi container? The
>> manifest of
>> cxf-2.3.1.jar looks OK, but there are a lot of missing libraries in
>> the lib
>> directory of the distribution. Finally I have managed to find and resolve
>> all missing constraints, but then CXF had some class loading issues.
>>
>> Maybe CXF is not supporting OSGi fully at the moment? If it suports OSGi
>> some tutorial is must have thing for the developers.
>>
>> BR,
>> Łukasz
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Re: CXF 3.1 in OSGi container (equinox)

Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday 22 December 2010 2:28:35 am Christian Schneider wrote:
> I read some days ago on Dan Kulp´s blog that Talend released the first
> version of Talend Service Factory.
> http://www.dankulp.com/blog/?p=285
> 
> The interesting thing for you is that it contains a complete osgi
> container with Karaf and all dependencies for CXF.
> That should make it much easier for you.

Yep.   That is definitely the easiest thing to look at.   At the very least, 
even if you don't end up using it as is, it would be a good thing to look at 
to see what bundles it has installed and running by default.    As Willem 
said, getting all of them  isn't easy as a lot of the CXF deps are not OSGi 
bundles so they need to be mapped to the equivalent SMX bundle and such.   
We've done that mapping and such for Talend Service Factory which could really 
save you some time and effort.

Dan



> 
> I also struggled for a while to get CXF running in an Eclipse RCP
> GUI.  From what I learned you need the osgi ready dependencies and you
> also have to tune the
> starter as CXF needs some more current libs of java apis on the boot
> class path.
> (also see:
> http://blog.springsource.com/2009/01/19/exposing-the-boot-classpath-in-osgi
> /)
> 
> Best regards
> 
> Christian
> 
> Am 21.12.2010 11:50, schrieb bisior:
> > Hi,
> > 
> > Can someone explain me how to run CXF 3.1 in OSGi container? The manifest
> > of cxf-2.3.1.jar looks OK, but there are a lot of missing libraries in
> > the lib directory of the distribution. Finally I have managed to find
> > and resolve all missing constraints, but then CXF had some class loading
> > issues.
> > 
> > Maybe CXF is not supporting OSGi fully at the moment? If it suports OSGi
> > some tutorial is must have thing for the developers.
> > 
> > BR,
> > Łukasz

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

Re: CXF 3.1 in OSGi container (equinox)

Posted by Christian Schneider <ch...@die-schneider.net>.
I read some days ago on Dan Kulp´s blog that Talend released the first 
version of Talend Service Factory.
http://www.dankulp.com/blog/?p=285

The interesting thing for you is that it contains a complete osgi 
container with Karaf and all dependencies for CXF.
That should make it much easier for you.

I also struggled for a while to get CXF running in an Eclipse RCP
GUI.  From what I learned you need the osgi ready dependencies and you 
also have to tune the
starter as CXF needs some more current libs of java apis on the boot 
class path.
(also see: 
http://blog.springsource.com/2009/01/19/exposing-the-boot-classpath-in-osgi/)

Best regards

Christian

Am 21.12.2010 11:50, schrieb bisior:
> Hi,
>
> Can someone explain me how to run CXF 3.1 in OSGi container? The manifest of
> cxf-2.3.1.jar looks OK, but there are a lot of missing libraries in the lib
> directory of the distribution. Finally I have managed to find and resolve
> all missing constraints, but then CXF had some class loading issues.
>
> Maybe CXF is not supporting OSGi fully at the moment? If it suports OSGi
> some tutorial is must have thing for the developers.
>
> BR,
> Łukasz

-- 
----
http://www.liquid-reality.de


Re: CXF 3.1 in OSGi container (equinox)

Posted by Freeman Fang <fr...@gmail.com>.
On 2010-12-21, at 下午6:50, bisior wrote:

>
> Hi,
>
> Can someone explain me how to run CXF 3.1 in OSGi container? The  
> manifest of
> cxf-2.3.1.jar looks OK, but there are a lot of missing libraries in  
> the lib
> directory of the distribution. Finally I have managed to find and  
> resolve
> all missing constraints, but then CXF had some class loading issues.
>
> Maybe CXF is not supporting OSGi fully at the moment? If it suports  
> OSGi
> some tutorial is must have thing for the developers.

Hi,

CXF fully support OSGi, ensure you use cxf-bundle-2.3.1.jar(which is  
OSGi friendly) in OSGi container, also you need install several other  
OSGi bundles(which isn't in CXF distributions) to make cxf- 
bundle-2.3.1.jar resolved successfully, I must say  figure out all  
those OSGi bundles which make cxf-bundle.jar work correctly isn't a  
simple task. Fortunately some other project such as Apache Servicemix  
4.x(configurable to use equinox or felix as OSGi runtime core) already  
do it for you,  cxf feature (feature item in servicemix/karaf  
baiscally means a set of bundles) get installed out of box and also  
with Servicemix 4.x kit there're several cxf related examples which  
you can quickly grasp the basic idea that how to use cxf in OSGi  
container.

Freeman
>
> BR,
> Łukasz
> -- 
> View this message in context: http://cxf.547215.n5.nabble.com/CXF-3-1-in-OSGi-container-equinox-tp3313313p3313313.html
> Sent from the cxf-dev mailing list archive at Nabble.com.


-- 
Freeman Fang

------------------------

FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org