PDA

View Full Version : Why is the commons-logging bundle missing from the distribution ?


amooy
May 8th, 2008, 09:42 AM
Hi

I'm experimenting with DM in my eclipse RCP application and yesterday I set up a new RCP target platform containing all the DM bundles and their very basic dependencies (spring, aopalliance, log4j, slf4j, etc.). When I tried to run my application against this platform I got lots of errors about commons-logging packages not being available. After I added the commons-logging bundle from the SpringSource Enterprise Bundle Repository (S2EBR ?) everything worked like a charm.

If there is a dependency on commons-logging, why is it not distributed along with all the other bundles in the lib/ directory of the distribution ? Or is there another solution which is missed ?

Regards,
Age Mooy

Costin Leau
May 12th, 2008, 03:24 AM
Instead of commons-logging, Spring-DM uses sfl4j. See the FAQ:
http://static.springframework.org/osgi/docs/current/reference/html/spring-osgi-faq.html#logging

amooy
May 12th, 2008, 07:47 AM
When I try to run the application without the common-logging bundle, all of the spring bundles fall with missing dependencies because they "Import-Package" the commons logging packages. I have got both slf4j.api and slf4j.log4j12 bundles loaded. I've read the FAQ and I understand the need to do away with commons logging but I can't figure out how to do it.... so what am I missing ?

Costin Leau
May 12th, 2008, 08:27 AM
You also need jcl104-over-sfl4j jar since this the one that exposes the commons-logging packages.

amooy
May 12th, 2008, 08:35 AM
Thank you, that did the trick.

It might be a good idea to add to the relevant FAQ sections that you need all three of the bundles for this to work at runtime. I missed the last bundle because I was scanning the lib directory for jar files that started with slf4j*.

Costin Leau
May 13th, 2008, 04:48 AM
Will do. Consider raising a JIRA issue as well (just to make it's not lost somehow).
Cheers,