Servicemix 4, DOSGi and Zookeeper

It is a crossroads hosted by the fusesource forum and the servicemmix forum .

I cannot get DOSGi to work in FUSE. I am trying to get CXF DOSGi 1.1-SNAPSHOT with Zookeeper detection on FUSE 4.1.0.2. I am also using Zookeepr 3.2.1.

Everything works fine on Felix 2.0.0. I just follow the instructions on the DOSGi Discovery page and then install the Discovery Demo . For DOSGi, I just use cxf-dosgi-ri-singlebundle-distribution-1.1-SNAPSHOT.jar for DSW and cxf-dosgi-ri-discovery-singlebundle-distribution-1.1-SNAPSHOT.jar to detect zookeepr. Then when I run the sample packages with the impl service sample on the same machine, I see a node being created in zookeeper. Then I run the sample client on another machine and I see the output on the service machine. Works great. I have a warning that the xml error is being ignored because some XSD was not found, but it doesn't seem to affect anything. Oh, I also have to install the Compendium OSGi package first.

When I go to Fuse, I have no such luck. The Compendium OSGi kit comes with a fuse, so there is no need to install it. I should just install a single dosgi-ri suite and a single dosgi-ri-discovery package, but that won't work. The single dosgi-ri set has all sorts of overlapping packages with servicemix. Am I getting a message about port 8081? or whatever the osgi.http.service parameter is already in use. Apparently the only dosgi-ri connection comes with the pax web service, which reads the same property as the servicemix http service that comes with servicemix. That's when I switch to cxf-dosgi-ri-multibundle-distribution-1.1-SNAPSHOT.zipand unzip it to accept the parts you want. I take the dsw kit from the dosgi-ri reusable kit and install it. No luck due to jdom dependency. Then I install jdom which comes with ri multibundle which works great. Then go back to dsw and that will be installed, so I think I'm going somewhere. It's time to go back and install the one-time ri-discovery kit. When I start, I get the classcastexception of the pax service saying it cannot be piped to the osgi logservice or something. But this is only a registration error and at the bottom she says she cannot find the transport class for http://schemas.xmlsoap.org/soap/http... Ok, so registration is confusing and I am missing some transport class. Well, clearly this is due to the fact that he did not install enough multi-year circulation because he worked for felix. So what else is needed there. The cxf-minimal package is missing a missing class that causes the last error when checked. So I install this. Try to run detection package but I am getting corbabroker exception. Wtf. Whose corba uses in all this? Then I go back and undo the whole thing and try to stick with the one-off ri and ri-discovery distributions, but just disable the servicemix http service. This crashes servicemix and I cannot restart it because the cxf jbi components end up with an unsatisfied dependency. It's strange. I'll just ignore it because I don't use them anyway,and try to run my samples. Unable to run samples because it says the dock cannot start because the ports are already in use. Doesn't make sense because I've already disabled the servicemix http service. Then I recharge the dock. Works? May be. My service is registering and I can navigate to wsdl using firefox, but not registering with zookeeper. Try to close the ri-discovery package and restart it, but I am getting a nullpointer exception. Obviously, the ri opening never started due to one of the above errors. Then I started trying to disassemble the ri-discovery unib and pull out the internals. It didn't work because all of this was apparently necessary, even though internally we could do without any libraries.that the dock cannot start because the ports are already in use. Doesn't make sense because I've already disabled the servicemix http service. Then I recharge the dock. Works? May be. My service is registering and I can navigate to wsdl using firefox, but not registering with zookeeper. Try to close the ri-discovery package and restart it, but I am getting a nullpointer exception. Obviously, the ri opening never started due to one of the above errors. Then I started trying to parse the ri-discovery unibundle and pull out the internals. It didn't work because all of this was apparently necessary, even though internally we could do without any libraries.that the dock cannot start because the ports are already in use. Doesn't make sense because I've already disabled the servicemix http service. Then I recharge the dock. Works? May be. My service is registering and I can navigate to wsdl using firefox, but not registering with zookeeper. Try to close the ri-discovery package and restart it, but I am getting a nullpointer exception. Obviously, the ri opening never started due to one of the above errors. Then I started trying to parse the ri-discovery unibundle and pull out the internals. It didn't work because all of this was apparently necessary, even though internally we could do without any libraries.Works? May be. My service is registering and I can navigate to wsdl using firefox, but not registering with zookeeper. Try to close the ri-discovery package and restart it, but I am getting a nullpointer exception. Obviously, the ri opening never started due to one of the above errors. Then I started trying to parse the ri-discovery unibundle and pull out the internals. It didn't work because all of this was apparently necessary, even though internally we could do without any libraries.Works? May be. My service is registering and I can navigate to wsdl using firefox, but not registering with zookeeper. Try to close the ri-discovery package and restart it, but I am getting a nullpointer exception. Obviously, the ri opening never started due to one of the above errors. Then I started trying to parse the ri-discovery unibundle and pull out the internals. It didn't work because all of this was apparently necessary, even though internally we could do without any libraries.Then I started trying to parse the ri-discovery unibundle and pull out the internals. It didn't work because all of this was apparently necessary, even though internally we could do without any libraries.Then I started trying to parse the ri-discovery unibundle and pull out the internals. It didn't work because all of this was apparently necessary, even though internally we could do without any libraries.

End of the story. Can't get it to work. Can anyone else make it work? I just want to run detection samples in SMX4. I'm pretty sure this is just a bundle problem. Isn't that what OSGi should fix ??? It's worse than just telling me which bars you depend on and making me customize my class. At least I will eventually make sure everything works.

My next steps, I think, will repeat with ri-multibundle, only dsw and jdom, plus a one-time ri-discovery kit. Then I'll try some of the cxf-fuse packages or some of the cxf-rt packages to get around the soap transfer issue.

Edit Notes: I need more than just showing DOSGi packages in an active state. They don't really do much until you try to open a service through them. I need to see multiple computers registering services with the zookeeper instance and other computers using those services, just like using the DOSGi Discovery Sample.

I was able to get a cxf to expose a sample distributed service as a soapy web service using the minimal cxf package mentioned by either removing parts of the original cxf packages, or restarting the jetty service and then starting the probing service ... or setting the minimum cxf pool, then starting my service, then immediately uninstalling the minimal cxf package and then reloading the jetty ... I think it was an order. None of these will work from a clean startup, and restarting services as a routine for DOSGi to work is just plain bad. I don't even know why installing and uninstalling would remove anything - it shouldn't leave artifacts around.

+2


source to share


1 answer


First point, looking at the CXF DOSGi mega-package, I think this is just for a quick n-dirty hack in an annual OSGi runtime, basically the minimal environment provided by Equinox and Felix. It will not be used for richer environments like FUSE or Servicemix, as you are more likely to come across bundled and platform services as you seem to have seen.

I managed to get Servicemix 4.0 to start cleanly (this is on Windows) and then I hotly deployed:

  • com.springsource.org.jdom-1.0.0.jar
  • Cxf-bundle minimal-2.2.1.jar
  • Cxf-dosgi-ri-opening local-1.0.jar
  • cxf.dosgi-ri-dws.cxf-1.0.jar


Using the Servicemix console I listed all the packages and saw that all of the above was able to Active

(as expected). I listed services and 2 CXF DOSGi packages exported services, so they seemed to work correctly. No errors were reported in the log.

How familiar are you with OSGi? Servicemix looks pretty big and learning OSGi, Servicemix, and CXF / DOSGi together won't be easy (in my opinion).

The supplied console is not suitable for OSGi and I would suggest installing the Apache Felix console packages for the web interface .

+1


source







All Articles