Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » First steps to OSGi
First steps to OSGi [message #65172] Thu, 20 April 2006 01:16 Go to next message
Eclipse UserFriend
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 #65195 is a reply to message #65172] Thu, 20 April 2006 01:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kirankuppa.gmail.com

I was able to make my "First Steps". -:) . This was possible after
installing and
starting org.eclipse.osgi.services and org.eclipse.osgi.util. Can anyone
please
tell me what these two bundles are doing here.
It would just illuminate me a bit; though I am not completely done
reading the
spec.

Thanks,

Kiran Kuppa
Re: First steps to OSGi [message #65216 is a reply to message #65195] Thu, 20 April 2006 15:46 Go to previous message
Eclipse UserFriend
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
Previous Topic:bundling by reference
Next Topic:OSGi bundles in web app
Goto Forum:
  


Current Time: Thu Apr 25 07:46:48 GMT 2024

Powered by FUDForum. Page generated in 0.02594 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top