3 Replies Latest reply on Sep 26, 2009 9:12 AM by jellin

    Servicemix 4, DOSGi, and Zookeeper

    charly_hermanson

      Hello,

      I'd like to setup Servicemix 4.1.0.2 with DOSGi and Zookeeper.  Currently, I'm running into some problems with port conflict (2181) during startup with the single distribution bundle of DOSGi.  Has anyone played with DOSGi and Zookeeper using servicemix successfully?

       

      Thanks,

      Charly

        • 1. Re: Servicemix 4, DOSGi, and Zookeeper
          jellin

          I have the same problem.  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  page and then install the  Discovery Demo  bundles.  For DOSGi, I just use the  cxf-dosgi-ri-singlebundle-distribution-1.1-SNAPSHOT.jar for DSW and  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 8081? 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 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.

          • 2. Re: Servicemix 4, DOSGi, and Zookeeper
            jellin

            I crossposted to the servicemix nabble forum

            http://www.nabble.com/forum/ViewPost.jtp?post=25625074&framed=y

            • 3. Re: Servicemix 4, DOSGi, and Zookeeper
              jellin