Hi All
 
I have a setup some thing like this.
 
I have an exe which loads a jar file say Service.jar (Which has a class
CService). This jar file instantiates (Embed new Felix(,,)) Felix.
 
Now using Felix instance i will register a service and pass object if
CService to it.
 
Now I have a felix bundle which  finds the service and uses it.
 
Service.jar is loaded by some exe. (That is exe loads the Service.jar, jar
instantiates Felix.)
 
Interace which Service implements for registering the service i have made as
another jar. (Is this correct?? Or interface should be inside the OSGI
bundle itself?)
 
 
Now my problem is loaded bundle is not able to find the package exported by
service.jar.
 
I would like to know, Is this type of setup is possible? Is this valid? 
 
I have attached the consol trace of what happned and the manifest file of
the bundle.
 
 
Welcome to Felix.
=================
 
Enter profile name: 1
 
DEBUG: WIRE: 1.0 -> org.ungoverned.osgi.service.shell -> 1.0
DEBUG: WIRE: 1.0 -> org.osgi.service.startlevel -> 0
DEBUG: WIRE: 1.0 -> org.apache.felix.shell -> 1.0
DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 1.0 -> org.osgi.service.packageadmin -> 0
DEBUG: WIRE: 2.0 -> org.apache.felix.shell -> 1.0
DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 3.0 -> org.osgi.service.obr -> 3.0
-> DEBUG: WIRE: 3.0 -> org.apache.felix.shell -> 1.0
Intalled....
org.osgi.framework.BundleException: Unresolved package in bundle 13:
package; (&(package=demoOsgiService)(version>=0.0.0))
        at org.apache.felix.framework.Felix._resolveBundle(Felix.java:1699)
        at org.apache.felix.framework.Felix._startBundle(Felix.java:1566)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1519)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:354)
        at demoOsgiService.NonMain.notmain(NonMain.java:232)
        at demoOsgiService.COSGIService.runProc(COSGIService.java:152)
        at
com.sdt.sne.eoa.passive.PassiveService.mainProc(PassiveService.java:98)
        at
com.sdt.sne.eoa.passive.PassiveService.onBasicActivated(PassiveService.java:
70)
        at
demoOsgiService.COSGIService.onBasicActivated(COSGIService.java:86)
        at com.sdt.sne.Service.onActivated0(Service.java:163)
 
-> ps
 
=========================Manifest File===================================
Bundle-Name: Dictionary client
Bundle-Description: A bundle that uses the dictionary service if it finds it
at startup
Bundle-Vendor: Apache Felix
Bundle-Version: 1.0.0
Bundle-Activator: demoOsgiServiceCleint.Activator
Import-Package: org.osgi.framework,demoOsgiService
 

 

Reply via email to