aspose file tools*
The moose likes Other Application Frameworks and the fly likes osgi (felix): NoClassDefFoundError: org/apache/commons/logging/LogFactory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "osgi (felix): NoClassDefFoundError: org/apache/commons/logging/LogFactory" Watch "osgi (felix): NoClassDefFoundError: org/apache/commons/logging/LogFactory" New topic
Author

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

olze oli
Ranch Hand

Joined: Jun 20, 2009
Posts: 148
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

Joined: Nov 25, 2003
Posts: 33
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


Mike Van
Apache Software Foundation Committer
olze oli
Ranch Hand

Joined: Jun 20, 2009
Posts: 148
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
 
Don't get me started about those stupid light bulbs.
 
subject: osgi (felix): NoClassDefFoundError: org/apache/commons/logging/LogFactory