NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Felix OSGi container seems to ignore "org.osgi.framework.system.packages.extra" Property

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
michael.kuettner



Joined: 29 Jul 2010
Posts: 9
Location: Germany

PostPosted: Wed Aug 11, 2010 8:45 am    Post subject: Felix OSGi container seems to ignore "org.osgi.framework.system.packages.extra" Property Reply with quote

I want to use some OSGi bundles for my Netbeans Platform based application. One of the bundles is using the packages "sun.misc" and "sun.reflect". So i need a provider for these packages.
Because both packages are contained in the Java system the OSGi system bundle should be able to export them.
I tried to extend the list of default packages by setting "org.osgi.framework.system.packages.extra=sun.misc,sun.reflect".

This works fine with Netbinox implementation, but it does not work with the standard Netbeans OSGi container Felix. Felix seems to igore the "org.osgi.framework.system.packages.extra" property. Also the "org.osgi.framework.bootdelegation" property seems to be ignored.

My appication is built by Maven and NBM Maven Plugin. All properties are set using the <additionalArguments> tag.
Code:

<build>
  <plugins>
    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>nbm-maven-plugin</artifactId>
      <version>3.3-SNAPSHOT</version>
      <configuration>
        <additionalArguments>-J-Dorg.osgi.framework.system.packages.extra=sun.misc,sun.reflect
        </additionalArguments>
      </configuration>
    </plugin>
  </plugins>
</build>


Are there any differences between Felix and Equinox Netbeans integration regarding these properties?
Or is there another way to make Felix able to provide the system packages "sun.misc" and "sun.reflect"?
Back to top
michael.kuettner



Joined: 29 Jul 2010
Posts: 9
Location: Germany

PostPosted: Tue Aug 17, 2010 11:34 am    Post subject: Reply with quote

I found a workaround for this problem.

I simply added the two missing packages to the list of public packages of the parent Netbeans module that uses the OSGi bundle.
Code:

OpenIDE-Module-Public-Packages:
 sun.misc.*,
 sun.reflect.*

Now everything is fine for Felix!

Mybe this is useful for somebody else.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo