It works now, but I have another problem: my bundle is not seen as bundle from obr, so I get:
ka...@root> obr:start 96 Unknown bundle - 96 What I have done: First I've added the sprinb OBR to my karaf instance: obr:addurl http://sigil.codecauldron.org/spring-release.obr obr:addurl http://sigil.codecauldron.org/spring-external.obr Now the dep problem was about httpclient and after having replaced my maven dep with the one from springsource OBR, I did: obr:start 99 where 99 is the installed httpclient id and one dep, apache commons-codec, has been automatically downloaded and activated. Nice. Now I have one of my bundle installed, id 96, that depends upon org.json that's available from OBR: http://ebr.springsource.com/repository/app/bundle/version/detail?name=com.springsource.org.json&version=1.0.0&searchType=bundlesBySymbolicName&searchQuery=org.json Here is the console output: ka...@root> start 96 Error executing command: Unresolved constraint in bundle salesforce-auth [96]: Unable to resolve 96.0: missing requirement [96.0] package; (&(package=org.json)(version>=1.0.0)(!(version>=2.0.0))) ka...@root> obr:start 96 Unknown bundle - 96 Here something else I do not know: what's the difference between those bundles and mine so httpclient is resolved as a bundle and mine is not? Here is the manifest of the bundle 96, watching manifest of httpclient I can't spot any difference I find useful... Manifest-Version: 1.0 Bundle-Version: 1.0.0.SNAPSHOT Tool: Bnd-0.0.357 Bundle-Name: Salesforce REST authentication Bnd-LastModified: 1291906624221 Created-By: 1.6.0_20 (Sun Microsystems Inc.) Bundle-ManifestVersion: 2 Bundle-SymbolicName: salesforce-auth Import-Package: javax.servlet,javax.servlet.http,org.apache.commons.ht tpclient;version="[3.1,4)",org.apache.commons.httpclient.methods;vers ion="[3.1,4)",org.json;version="[1.0,2)",org.restlet,org.restlet.data ,org.restlet.representation,org.restlet.resource,org.restlet.routing, org.restlet.util,org.slf4j;version="[1.6,2)",org.slf4j.helpers;versio n="[1.6,2)",org.springframework.beans.factory.annotation;version="[3. 0,4)" 2010/12/7 John Bäckstrand <[email protected]> > I think that should work, yes. The slf4j bundles in ebr worked fine for me. > > On Tue, Dec 7, 2010 at 22:09, [email protected] <[email protected]> wrote: > > > you mean that declaring in maven file this one > > > > > > > http://ebr.springsource.com/repository/app/bundle/version/detail?name=com.springsource.slf4j.api&version=1.6.1&searchType=bundlesByName&searchQuery=slf4j > > > > instead of normal slf4j dependency would in the end solve the problem? > > > > 2010/12/7 John Bäckstrand <[email protected]> > > > > > I actually don't know what the more "correct" way of doing things are. > I > > > think the most proper way to use slf4j in osgi is probably with a > > > slf4j->osgi logging service bridge, but I took the shortcut of using > the > > > slf4-simple implementation. I simply added the slf4j dependencies in my > > > maven file from the spring EBR repo. > > > > > > I was using pax-runner when experimenting with this so that might > change > > > how > > > things work. > > > > > > On Tue, Dec 7, 2010 at 21:41, [email protected] <[email protected]> > > wrote: > > > > > > > Hi all. > > > > > > > > short: on karaf 2.1 how do I resolve a missing slf4j dependencies? > > > > I have also read this without understanding much more... > > > > > > > > > > > > > > http://karaf.apache.org/manual/2.1.99-SNAPSHOT/users-guide/logging-system.html > > > > > > > > long: > > > > OSGI world moves fast. information are flowing fast and often > following > > > > some > > > > 6 month old guide means making 10 times the work needed now. > > > > In fact I am now using actually Karaf 2.1 and I succesfully installed > > web > > > > console, activemq with just a few commands. Nice. > > > > > > > > One of my bundle, created with maven-bundle-plugin, correctly > requires > > > > activemq, geronomo jms and slf4j. > > > > slf4j is missing from my karaf runtime. > > > > > > > > I can see that even the slf4j on central maven repo has osgi manifest > > > > information but I do not know how to use it in my karaf, at least > what > > is > > > > the best way: I think that I should add a obr url with obr:addUrl > > command > > > > but I can't find a repository.xml that contains slf4j. > > > > > > > > What's the suggested way? > > > > I'd like to add http://ebr.springsource.com/repository/app as obr > url > > > but > > > > it > > > > does not work. Is that wrong? > > > > > > > > Thanks for helping me out of the mess :) > > > > > > > > -- > > > > Daniele Dellafiore > > > > http://danieledellafiore.net > > > > > > > > > > > > > > > > -- > > > John Bäckstrand > > > > > > > > > > > -- > > Daniele Dellafiore > > http://danieledellafiore.net > > > > > > -- > John Bäckstrand > -- Daniele Dellafiore http://danieledellafiore.net

