Announcement Announcement Module
Collapse

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
How OSGi system bundle works? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Hi,

    Could somebody please throw some light?

    Thanks,
    Shashi

    Comment


    • #3
      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

      Comment


      • #4
        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

        Comment


        • #5
          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

          Comment


          • #6
            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

            Comment

            Working...
            X