2

I'm working on a Servlet which I am deploying as an OSGi Plugin on a Lotus Domino Server (8.5.3).

The servlet uses HttpClient to make REST style requests of a backend server.

Currently Domino 8.5.3 ships with org.apache.commons.httpclient (3.0.0.20110912-1350). I would really like to use org.apache.httpcomponents.httpclient-4.2.1.

Any idea how I can deploy the jars (there are dependencies, core, logging, codec) on the Server so that they are available to my osgi plugin?

I've had quite a bit of help getting this far but this one is defeating me, and I have code that works if only I had access to the httpcomponents.httpclient api :-)

Many many thanks in advance :-)

Jason Hook
  • 89
  • 1
  • 4

1 Answers1

1

Don't know if Lotus Domino is a OSGi capable server, but usually you just need to add a version to your import-package part for the httpclient api packages. For example your Mantifest should contain something like

Import-Package: org.apache.httpclient;version=[4.2,5)

Now if Lotus Domino is a OSGi capable server it should be straight forward to deploy your httpclient jar in version 4.2.1 (I think this one already does contain a manifest declaring the right packages) In case this is not the case you might want to create your own OSGi-ready httpclient package, the BND tools and the apache maven-bundle-plugin will help you on that.

Achim Nierbeck
  • 5,265
  • 2
  • 14
  • 22
  • 1
    The latest versions are OSGI capable. But changing core libs puts the server in an unsupported configuration. May work, more likely to break something else. – Simon O'Doherty Oct 31 '12 at 06:32
  • 1
    well if it's OSGi based you should be able to place your higher versioned lib into and it should work without an issue since, if Notes is doing it right (the OSGi way) the Notes bundles should import the right package with the right version (in this case a lower one). That's one of the biggest benefits of OSGi being able to deploy different versions of the same bundle. – Achim Nierbeck Oct 31 '12 at 08:24