2016-11-10 49 views
0

我有一些jar包依賴項,但我不知道爲什麼,當我運行此軟件包時,它無法解析來自slf4j.jar的軟件包。OSGI knopflerfish缺少軟件包或無法解析它們

這是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]. 

這是我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 

回答

1

您需要安裝導出包org.slf4j捆綁。我不知道是否有在這konpflerfish標準叢。在Apache karaf中,我們使用pax-logging來達到這個目的。我認爲logback也可以提供這個。

+0

再次感謝Christian,我已經解決了這個問題,將罐子添加爲內部罐子,而不是外部罐子。 – Datex2

相關問題