0

I have a bundle with some jars dependencies but I do not know why, when I run this bundle, it can not resolve the packages from slf4j.jar.

This is the error showed by knopflerfish:

WARNING: Prefs file removed in background /root/.java/.userPrefs/prefs.xml
[stderr] ## DEBUG: errors - FrameworkErrorEvent bundle #43
[stderr] ## DEBUG: errors - FrameworkErrorEvent throwable: 
[stderr] org.osgi.framework.BundleException: Bundle#43, unable to resolve: Missing package(s) or can not resolve all of the them:
org.slf4j -- Could not resolve exporting bundle - org.slf4j;version=1.6.1 Bundle[id=29,gen=0].

And this is my bundle manifest:

Manifest-Version: 1.0
Bundle-SymbolicName: MapMatching
Export-Package: its.fac.mapmatching.bundle, its.fac.mapmatching.impl, 
 its.fac.mapmatching.thread, its.fac.mapmatching.utils
Bundle-Version: 1.0.4
Bundle-Name: MapMatching
Bundle-ClassPath: .
Bundle-Activator: its.fac.mapmatching.bundle.Activator
Bundle-ManifestVersion: 3
Import-Package: its.fac.mapmatching.services, its.fac.mapmatching.type
 s, its.fac.poti.api.services, org.postgis, org.slf4j, its.fac.mapmatc
 hing.factory, its.fac.poti.api.types, org.osgi.framework, org.osgi.ut
 il.tracker
Andoni Da Silva
  • 1,161
  • 15
  • 31

1 Answers1

1

You need to install a bundle that exports the package org.slf4j. I don't know if there is a standard bundle for this in konpflerfish. In Apache karaf we use pax-logging for this purpose. I think logback can also provide this.

Christian Schneider
  • 19,420
  • 2
  • 39
  • 64