Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

osgi (felix): NoClassDefFoundError: org/apache/commons/logging/LogFactory

 
olze oli
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i wrote an application that can handle with plugins, so i used osgi (apache felix) with the FileInstall Bundle, which works really nice.
The problem is that one bundle uses the apache httpclient (osgi'd version) which uses apache commons logging.
When the plugin gets started, i get the following error:


i'm working on this since 2 days and i have absolutly no idea whats wrong.
I tried it with the springsource commons logging jar which is osgi'd

i even tried it with pax logging (osgi'd) which makes no difference ...
when i debug my application in netbeans it works and i dont know why. the output is then printed to the debug console (every http request/response) so it looks like netbeans has something configured other than i did with the logging stuff...
can please someone help me? any hint?
 
Michael Van
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would download Karaf and try your application in that, then look at your logs. Karaf is an OSGi container that provides additional functionality to the underlying framework. Currently, when Karaf is distributed, it uses Felix under the covers. So, you should be able to drop your bundles into the ${KARAF_HOME}/deploy directory and get everything running pretty quickly.

If this doesn't work, look for the log messages (in ${KARAF_HOME}/data/log/karaf.log) and paste the relevant exceptions here.

Mike Van
Apache Software Foundation Committer
 
olze oli
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got it fixed, thanks

i'm using now the maven pax logging bundle and added an import for commons-logging to the httpclient osgi bundle (which - no idea why - wasn't there).
that fixed my problem
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic