NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
michael.kuettner
Joined: 29 Jul 2010 Posts: 9 Location: Germany
|
Posted: Wed Aug 11, 2010 8:45 am Post subject: Felix OSGi container seems to ignore "org.osgi.framework.system.packages.extra" Property |
|
|
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
|
Posted: Tue Aug 17, 2010 11:34 am Post subject: |
|
|
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 |
|
 |
|
|
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
|
|