eclipse-archived / concierge

Eclipse Concierge™ project
https://www.eclipse.org/concierge/
Eclipse Public License 1.0
33 stars 22 forks source link

Unable to launch Californium on Concierge with Bndtools #30

Closed fipro78 closed 6 years ago

fipro78 commented 7 years ago

I am trying to run Californium on Concierge in Bndtools. It does not work because io.netty.handler has several Import-Package requirements to Java system packages.

! Failed to start bundle io.netty.handler-4.1.9.Final, exception Resolution failed [BundleRequirement{Import-Package javax.crypto}, BundleRequirement{Import-Package javax.crypto.spec}, BundleRequirement{Import-Package javax.net.ssl}, BundleRequirement{Import-Package javax.security.auth.x500}, BundleRequirement{Import-Package javax.security.cert}]

I learned about the org.osgi.framework.system.packages.extra and that I need to specify the javax packages this way. But using Bndtools I am somehow not able to specify that property in a way that it gets used. I tried adding it to the OSGi Framework Properties, Launcher Arguments and JVM Arguments. But none seems to fit.

Is this an issue in Bndtools or am I making something wrong?

I manually created a runtime with the necessary bundles and created an .xargs file with the following content

# specify additional system packages to load
-Dorg.osgi.framework.system.packages.extra+=javax.crypto,
-Dorg.osgi.framework.system.packages.extra+=javax.crypto.spec,
-Dorg.osgi.framework.system.packages.extra+=javax.net.ssl,
-Dorg.osgi.framework.system.packages.extra+=javax.security.auth.x500,
-Dorg.osgi.framework.system.packages.extra+=javax.security.cert,

# install and start all .jar files in bundles directory
-all bundles

which actually works.

tverbele commented 7 years ago

You should be able to add the required javax packages in your bndrun file using

-runsystempackages: javax.crypto,javax.crypto.spec,javax.net.ssl,javax.security.auth.x500,javax.security.cert

If this does not work, could you share your bnd workspace?

rellermeyer commented 7 years ago

Hi Dirk,

you could also install the java 5 profile fragment which exports many of the additional system packages. I am working on a way to auto-generate these framework extensions for a multitude of different platforms.

Best regards,

Jan.

On Mar 25, 2017, at 9:48 AM, Tim Verbelen notifications@github.com<mailto:notifications@github.com> wrote:

You should be able to add the required javax packages in your bndrun file using

-runsystempackages: javax.crypto,javax.crypto.spec,javax.net.ssl,javax.security.auth.x500,javax.security.cert

If this does not work, could you share your bnd workspace?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/eclipse/concierge/issues/30#issuecomment-289223922, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGMmf2Q7bDfrUWjstD-E0-61vrOhIeVnks5rpUVUgaJpZM4MoBSs.

fipro78 commented 7 years ago

Setting

-runsystempackages: javax.crypto,javax.crypto.spec,javax.net.ssl,javax.security.auth.x500,javax.security.cert

directly via the Source tab works. Thanks a lot. Sometimes the Run editor in Bndtools is not very intuitive for me.

What is the Java 5 profile fragment? Haven't found that anywhere nor do I find something on searching for it.

rellermeyer commented 6 years ago

The profile fragments add extra packages to the system bundle so that you have access to, e.g., javax. or org.w3c. packages without needing to set org.osgi.framework.system.packages.extra