Results 1 to 6 of 6

Thread: How OSGi system bundle works?

  1. #1
    Join Date
    Jul 2006
    Posts
    126

    Default How OSGi system bundle works?

    Hi,

    I have a basic question regarding OSGi.

    I am using equinox as OSGi container. I have few of my application bundles. These get started when the I start the container.

    Today I migrated the complete setup to a different machine. I ran the setup within eclipse environment and it worked. However when I ran the setup in a standalone way, I started getting problems like
    Code:
    Package uses conflict: Import-Package: javax.xml.bind version "2.0.0"
    I noticed that the package javax.xml.bind is being exported by two bundles. One which I have added and the other the system bundle. I checked this again in the eclipse environment and found that here system bundle doesn't export "javax.xml.bind" package.

    I wanted to know how framework bundle decides which packages to export and which not?

    Would appreciate any information here.

    Thanks,
    Shashi

  2. #2
    Join Date
    Jul 2006
    Posts
    126

    Default

    Hi,

    Could somebody please throw some light?

    Thanks,
    Shashi

  3. #3
    Join Date
    Aug 2004
    Location
    France - Saint Nazaire
    Posts
    79

    Default

    Hi Shashi,

    How do you configure boot delagation for your standalone Equinox? Especially which values do you specify for the property org.osgi.framework.bootdelegation?

    For information, you can find the config.ini file for your Equinox container within Eclipse under the directory <YOUR_WORKSPACE>.metadata/.plugins/org.eclipse.pde.core/New_configuration.

    Otherwise, this Costin Leau's article could perhaps help you and give you some hints (cf http://blog.springsource.com/2009/01...spath-in-osgi/).

    Hope it helps you.
    Thierry

  4. #4
    Join Date
    Jul 2006
    Posts
    126

    Default

    Thanks for your reply Thierry.

    Actually I do not specify any value for org.osgi.framework.bootdelegation.
    In fact I used the same config.ini file present in <YOUR_WORKSPACE>.metadata/.plugins/org.eclipse.pde.core/SPRING_DM_PLATFORM

    which is the runtime directory while running the OSGi as part of eclipse. I got slightly confused to see different packages getting exported by the same system bundle.

    Please let me know any further thoughts on this.

    Regards,
    Shashi

  5. #5
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    It depends on what version of Equinox and JDK you are using - by default, the framework automatically detects the JDK and exports all the necessary packages through the system bundle.
    If that doesn't happen then:
    1. either the package is not exported by accident (if the rest are then this is a platform bug)
    2. you are using a JDK that doesn't provide this package (i.e. 1.4 or 1.5)
    3. the framework has been configured to not export the system packages
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  6. #6
    Join Date
    Jul 2006
    Posts
    126

    Default

    Hi Costin,

    Thanks for your reply. You are right. I had not checked the JRE under which I was running the equinox in two different environments. When I checked just now, I found that in standalone environment the equinox was getting started under JRE 1.6 and within eclipse it was using JRE 1.5. Hence the javax.xml.bind package was not getting exported within eclipse.

    Thanks for your help,
    Shashi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •