You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by warrior389 <jo...@gmail.com> on 2009/09/28 14:45:16 UTC

Servicemix 4, DOSGi, and Zookeeper

This is cross posted from
http://fusesource.com/forums/thread.jspa?messageID=4461

I can't get DOSGi working in FUSE.  I'm trying to get CXF's DOSGi
1.1-SNAPSHOT with Zookeeper discovery onto FUSE 4.1.0.2.  I'm also using
Zookeepr 3.2.1.   

Everything works perfectly on Felix 2.0.0.  I just follow the instructions
on the  [DOSGi Discovery|http://cxf.apache.org/dosgi-discovery.html]  page
and then install the  [Discovery
Demo|http://cxf.apache.org/dosgi-discovery-demo-page.html]  bundles.  For
DOSGi, I just use the 
[cxf-dosgi-ri-singlebundle-distribution-1.1-SNAPSHOT.jar|https://repository.apache.org/content/groups/snapshots/org/apache/cxf/dosgi/cxf-dosgi-ri-singlebundle-distribution/1.1-SNAPSHOT/cxf-dosgi-ri-singlebundle-distribution-1.1-SNAPSHOT.jar]
for DSW and 
[cxf-dosgi-ri-discovery-singlebundle-distribution-1.1-SNAPSHOT.jar|https://repository.apache.org/content/groups/snapshots/org/apache/cxf/dosgi/cxf-dosgi-ri-discovery-singlebundle-distribution/1.1-SNAPSHOT/cxf-dosgi-ri-discovery-singlebundle-distribution-1.1-SNAPSHOT.jar] 
for zookeepr discovery.  Then when I start the sample bundles with the
sample service impl on one machine, I see the node creation in zookeeper. 
Then I start the sample client on another machine and I see the output on
the service machine.  Works great.  I do have an warning about an xml error
being ignored because some XSD coudln't be found, but it doesn't seem to
affect anything. Oh, I also have to install the OSGi compendium bundle
first. 

When I move to Fuse, I have no such luck.  The OSGi compendium bundle comes
with fuse, so no need to install that.  I should just be able to install the
dosgi-ri singlebundle, and the dosgi-ri-discovery single bundle, but that
doesn't work.  The dosgi-ri singlebundle has all kinds of overlapping
bundles with servicemix.  I get an error about port 8181 or whatever the
osgi.http.service parameter is, being already in use.  Apparently the
dosgi-ri singlebundle comes with pax webservice, which reads the same
property as the servicemix http service bundle that comes with servicemix. 
Thats when I switch to the 
[cxf-dosgi-ri-multibundle-distribution-1.1-SNAPSHOT.zip|https://repository.apache.org/content/groups/snapshots/org/apache/cxf/dosgi/cxf-dosgi-ri-multibundle-distribution/1.1-SNAPSHOT/cxf-dosgi-ri-multibundle-distribution-1.1-SNAPSHOT.zip]
and unzip it to take the parts I want.  I take the dsw bundle out of the
dosgi-ri multibundle and install that.  No luck because of the jdom
dependency.  Then I install the jdom that comes in the ri multibundle, which
works fine.  Then go back to dsw, and that installs, so I think i'm getting
somewhere.  Time to go back and install the ri-discovery singlebundle.  When
I start that I get a pax logging service classcastexception saying it can't
be cast to a osgi logservice or something.  But thats just a logging error,
and at the bottom it says it can't find the transport class for
http://schemas.xmlsoap.org/soap/http.  Ok, so logging is screwed up and I'm
missing some transport class.  Well, clearly this comes from not installing
enough from the ri multibundle because it worked on felix.  So what else in
there is necessary.  The cxf-minimal-bundle upon inspection has the missing
class causing that last error.  So I install that.  Try to start the
discovery bundle, but I end up with some kind of corbabroker exception. 
Wtf.  Whose using corba in all of this?  Then I go back and undo all of that
and try to stick with the singlebundle distros of ri and ri-discovery, but
just turn off the servicemix http service.  That crashes servicemix and I
can't restart it becauuse the cxf jbi components end up with an unsatisfied
dependency.  Odd.  I'll just ignore that because I don't use those anyway,
and try to start my samples.  Can't start the samples because it says jetty
can't start because the ports already in use.  Doesn't make sense because I
shutdown the servicemix http service already. Then I restart jetty.  Works? 
Maybe.  My service gets registered and I can browse to the wsdl using
firefox, but no registration in zookeeper.  Try to shutdown the ri-discovery
bundle and restart it, but I get a nullpointerexception.  Appparently the
ri-discovery never actually started up due to one of the aforementioned
errors.  Then I started trying to take apart the ri-discovery singlebundle
and pull out the internals.  That didn't work because its all apparently
necessary, even though theres some libs inside we could do without. 

End of the story.  Can't get it to work.  Can anybody else get it to work? 
I just want to run the discovery samples in SMX4.  I'm pretty sure its just
a bundle conflict problem.  Isn't this what OSGi is supposed to fix???  This
is worse than just telling me what jars you depend on and making me setup my
classpath.  At least then I'd eventually get the thing running. 

My next steps, I think, will be to try again with the ri-multibundle, just
the dsw and jdom, plus the ri-discovery singlebundle.  Then I'll try some of
the cxf-fuse bundles or some of the cxf-rt bundles to get around the soap
transport issue. 
-- 
View this message in context: http://www.nabble.com/Servicemix-4%2C-DOSGi%2C-and-Zookeeper-tp25644913p25644913.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Servicemix 4, DOSGi, and Zookeeper

Posted by David Bosschaert <da...@gmail.com>.
Hi,

This is really a Fuse support issue, so you're right in posting it on the
fusesource forums.
I guess in general, the best way to approach something like this is by
taking individual bundles from the multi-bundle distro's (as you've done).
Start with root bundles and cxf-dosgi-ri-dsw-cxf and
cxf-dosgi-ri-discovery-distributed and see if you can fill the gaps with
other bundles that are part of the multi bundle distro.

Cheers,

David

2009/9/28 warrior389 <jo...@gmail.com>

>
> This is cross posted from
> http://fusesource.com/forums/thread.jspa?messageID=4461
>
> I can't get DOSGi working in FUSE.  I'm trying to get CXF's DOSGi
> 1.1-SNAPSHOT with Zookeeper discovery onto FUSE 4.1.0.2.  I'm also using
> Zookeepr 3.2.1.
>
> Everything works perfectly on Felix 2.0.0.  I just follow the instructions
> on the  [DOSGi Discovery|http://cxf.apache.org/dosgi-discovery.html]  page
> and then install the  [Discovery
> Demo|http://cxf.apache.org/dosgi-discovery-demo-page.html]  bundles.  For
> DOSGi, I just use the
> [cxf-dosgi-ri-singlebundle-distribution-1.1-SNAPSHOT.jar|
> https://repository.apache.org/content/groups/snapshots/org/apache/cxf/dosgi/cxf-dosgi-ri-singlebundle-distribution/1.1-SNAPSHOT/cxf-dosgi-ri-singlebundle-distribution-1.1-SNAPSHOT.jar
> ]
> for DSW and
> [cxf-dosgi-ri-discovery-singlebundle-distribution-1.1-SNAPSHOT.jar|
> https://repository.apache.org/content/groups/snapshots/org/apache/cxf/dosgi/cxf-dosgi-ri-discovery-singlebundle-distribution/1.1-SNAPSHOT/cxf-dosgi-ri-discovery-singlebundle-distribution-1.1-SNAPSHOT.jar
> ]
> for zookeepr discovery.  Then when I start the sample bundles with the
> sample service impl on one machine, I see the node creation in zookeeper.
> Then I start the sample client on another machine and I see the output on
> the service machine.  Works great.  I do have an warning about an xml error
> being ignored because some XSD coudln't be found, but it doesn't seem to
> affect anything. Oh, I also have to install the OSGi compendium bundle
> first.
>
> When I move to Fuse, I have no such luck.  The OSGi compendium bundle comes
> with fuse, so no need to install that.  I should just be able to install
> the
> dosgi-ri singlebundle, and the dosgi-ri-discovery single bundle, but that
> doesn't work.  The dosgi-ri singlebundle has all kinds of overlapping
> bundles with servicemix.  I get an error about port 8181 or whatever the
> osgi.http.service parameter is, being already in use.  Apparently the
> dosgi-ri singlebundle comes with pax webservice, which reads the same
> property as the servicemix http service bundle that comes with servicemix.
> Thats when I switch to the
> [cxf-dosgi-ri-multibundle-distribution-1.1-SNAPSHOT.zip|
> https://repository.apache.org/content/groups/snapshots/org/apache/cxf/dosgi/cxf-dosgi-ri-multibundle-distribution/1.1-SNAPSHOT/cxf-dosgi-ri-multibundle-distribution-1.1-SNAPSHOT.zip
> ]
> and unzip it to take the parts I want.  I take the dsw bundle out of the
> dosgi-ri multibundle and install that.  No luck because of the jdom
> dependency.  Then I install the jdom that comes in the ri multibundle,
> which
> works fine.  Then go back to dsw, and that installs, so I think i'm getting
> somewhere.  Time to go back and install the ri-discovery singlebundle.
>  When
> I start that I get a pax logging service classcastexception saying it can't
> be cast to a osgi logservice or something.  But thats just a logging error,
> and at the bottom it says it can't find the transport class for
> http://schemas.xmlsoap.org/soap/http.  Ok, so logging is screwed up and
> I'm
> missing some transport class.  Well, clearly this comes from not installing
> enough from the ri multibundle because it worked on felix.  So what else in
> there is necessary.  The cxf-minimal-bundle upon inspection has the missing
> class causing that last error.  So I install that.  Try to start the
> discovery bundle, but I end up with some kind of corbabroker exception.
> Wtf.  Whose using corba in all of this?  Then I go back and undo all of
> that
> and try to stick with the singlebundle distros of ri and ri-discovery, but
> just turn off the servicemix http service.  That crashes servicemix and I
> can't restart it becauuse the cxf jbi components end up with an unsatisfied
> dependency.  Odd.  I'll just ignore that because I don't use those anyway,
> and try to start my samples.  Can't start the samples because it says jetty
> can't start because the ports already in use.  Doesn't make sense because I
> shutdown the servicemix http service already. Then I restart jetty.  Works?
> Maybe.  My service gets registered and I can browse to the wsdl using
> firefox, but no registration in zookeeper.  Try to shutdown the
> ri-discovery
> bundle and restart it, but I get a nullpointerexception.  Appparently the
> ri-discovery never actually started up due to one of the aforementioned
> errors.  Then I started trying to take apart the ri-discovery singlebundle
> and pull out the internals.  That didn't work because its all apparently
> necessary, even though theres some libs inside we could do without.
>
> End of the story.  Can't get it to work.  Can anybody else get it to work?
> I just want to run the discovery samples in SMX4.  I'm pretty sure its just
> a bundle conflict problem.  Isn't this what OSGi is supposed to fix???
>  This
> is worse than just telling me what jars you depend on and making me setup
> my
> classpath.  At least then I'd eventually get the thing running.
>
> My next steps, I think, will be to try again with the ri-multibundle, just
> the dsw and jdom, plus the ri-discovery singlebundle.  Then I'll try some
> of
> the cxf-fuse bundles or some of the cxf-rt bundles to get around the soap
> transport issue.
> --
> View this message in context:
> http://www.nabble.com/Servicemix-4%2C-DOSGi%2C-and-Zookeeper-tp25644913p25644913.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>