First steps to OSGi [message #65172] |
Wed, 19 April 2006 21:16  |
Eclipse User |
|
|
|
Originally posted by: kirankuppa.gmail.com
My focus is in understanding the usage scenarios of OSGi in mobile
phone segment and I have just begun. Have read R4 spec briefly and
wanted to get my hands dirty.
I have downloaded equinox implementation org.eclipse.osgi_3.1.1.jar,
org.eclipse.osgi.services_3.1.1.jar, and org.eclipse.osgi.util_3.1.1.jar.
And start OSGi :
java -jar org.eclipse.osgi_3.1.1.jar -console, which provides me a console
prompt. Now, I would want to write a small bundle and deploy it. I use
this example, http://oscar-osgi.sourceforge.net/tutorial/ex1.html
with the following manifest file :
______________________________
Bundle-ManifestVersion: 2
Bundle-Activator: tutorial.example1.Activator
Bundle-Name: Service listener example
Bundle-Description: A bundle that displays messages at startup and when
service events occur
Bundle-Vendor: Richard Hall
Bundle-Version: 1.0.0
Bundle-SymbolicName: com. mynet.osgi.examples
Import-Package: org.osgi.framework; version="1.3"
_______________________________________
I install the bunde :
install file:/file:/X:/PROJECT/OSGi/equinox/Activator.jar
which puts the bundle in INSTALLED state. On the OSGi console, headers
command does provide me with all the above manifest information. So far
so good. However, bundle command [ bundle id on the OSGi console ], tells
me that no packages are imported :
_______________________________________
osgi> bundle 12
file:/X:/PROJECT/OSGi/equinox/Activator.jar [12]
Id=12, Status=INSTALLED Data
Root=X:\PROJECT\OSGi\equinox\configuration\org.
eclipse.osgi\bundles\12\data No registered services.
No services in use.
No exported packages
No imported packages
No fragment bundles
No named class spaces
No required bundles
_______________________________________
And the same error is shown when I try to start the bunde
osgi>start 12.
Please help me out.
Kiran Kumar
|
|
|
|
Re: First steps to OSGi [message #65216 is a reply to message #65195] |
Thu, 20 April 2006 11:46  |
Eclipse User |
|
|
|
Originally posted by: neil.integility.com
- org.eclipse.osgi.services provides the interfaces for all of the
optional services in the OSGi Compendium. Nothing that either provides or
consumes those services will be able to resolve without it. That even
includes the Log Service, so this bundle is nearly always required because
nearly everything wants to log.
- org.eclipse.osgi.util provides the non-service parts of the Compendium,
specifically XML Parser, Position Specification and Measurement (but
excluding ServiceTracker, which is found in org.eclipse.osgi, presumably
because it is so useful). Therefore pretty much anything that uses XML
needs this bundle.
Note that you can use the "diag <bundleId>" command on an unresolved
bundle to find out what imports failed to resolve.
Regards
Neil
|
|
|
Powered by
FUDForum. Page generated in 0.03014 seconds