But when I'm starting concierge I always got the following exception:
java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.jogamp.gluegen.runtime.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:102)
at com.jogamp.gluegen.runtime.NativeLibLoader.access$000(NativeLibLoader.java:51)
at com.jogamp.gluegen.runtime.NativeLibLoader$1.run(NativeLibLoader.java:70)
at java.security.AccessController.doPrivileged(Native Method)
at com.jogamp.gluegen.runtime.NativeLibLoader.loadGlueGenRT(NativeLibLoader.java:68)
at com.jogamp.common.jvm.JVMUtil.<clinit>(JVMUtil.java:56)
at javax.media.nativewindow.NativeWindowFactory.<clinit>(NativeWindowFactory.java:102)
at javax.media.opengl.GLProfile.initProfiles(GLProfile.java:855)
at javax.media.opengl.GLProfile.access$000(GLProfile.java:59)
at javax.media.opengl.GLProfile$1.run(GLProfile.java:989)
at java.security.AccessController.doPrivileged(Native Method)
at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:987)
at osgijogl.MainFrame.<init>(MainFrame.java:19)
at osgijogl.Activator.start(Activator.java:16)
at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(BundleImpl.java:446)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Framework.java:2468)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$0(Framework.java:2428)
at ch.ethz.iks.concierge.framework.Framework.startup(Framework.java:485)
at ch.ethz.iks.concierge.framework.Framework.main(Framework.java:315)
org.osgi.framework.BundleException: Error starting bundle Bundle : file:/C:/Bachelorarbeit/.metadata/.plugins/com.buglabs.osgi.concierge.runtime/bundles/OsgiJogl_1.0.0.jar
at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(BundleImpl.java:460)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Framework.java:2468)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$0(Framework.java:2428)
at ch.ethz.iks.concierge.framework.Framework.startup(Framework.java:485)
at ch.ethz.iks.concierge.framework.Framework.main(Framework.java:315)
All of the dll and jar files are in the /lib folder in the bundle.
If I run my bundle with another OSGI framework like Equinox it works fine without problems.
Is there a special way to load native code with the Concierge framework ?
Thx in advance,
Daniel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
no, it should run just as in every other OSGi framework but I remember there were some bugs in previous versions of Concierge with regard to native code handling. Have you tried the most recent release?
You can also try to run it with debug output enabled by setting -Dch.ethz.iks.concierge.debug=true
This should tell you how the native code directive in your bundle has been interpreted and where it looks for the library.
Cheers,
Jan.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Unfortunately I couldn't fix my problem yet. I'm using the current version of Concierge (1.0.0).
I've read in a paper about concierge that you have to extract Jar librarys if they contain native code, I haven't done this at my first tests.
Now I have extracted my librarys but it still doesn't work with a new exception:
purging storage …
INSTALLING file:/C:/eclipseEE/configuration/org.eclipse.osgi/bundles/732/1/.cp/jars/osgi.jar
INSTALLING file:/C:/Bachelorarbeit/.metadata/.plugins/com.buglabs.osgi.concierge.runtime/bundles/Anfang_1.0.0.jar
java.io.FileNotFoundException: .\storage\default\2\content\librarys\com (Zugriff verweigert)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleClassLoader.retrieveFile(BundleClassLoader.java:1039)
at ch.ethz.iks.concierge.framework.BundleClassLoader.findOwnClass(BundleClassLoader.java:615)
at ch.ethz.iks.concierge.framework.BundleClassLoader.findClass(BundleClassLoader.java:567)
at java.lang.ClassLoader.loadClass(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(BundleClassLoader.java:450)
at ch.ethz.iks.concierge.framework.BundleImpl.<init>(BundleImpl.java:196)
at ch.ethz.iks.concierge.framework.Framework.installNewBundle(Framework.java:1083)
at ch.ethz.iks.concierge.framework.Framework.installNewBundle(Framework.java:1051)
at ch.ethz.iks.concierge.framework.Framework.startup(Framework.java:458)
STARTING file:/C:/eclipseEE/configuration/org.eclipse.osgi/bundles/732/1/.cp/jars/osgi.jar
STARTING file:/C:/Bachelorarbeit/.metadata/.plugins/com.buglabs.osgi.concierge.runtime/bundles/Anfang_1.0.0.jar
at ch.ethz.iks.concierge.framework.Framework.main(Framework.java:315)
java.io.FileNotFoundException: .\storage\default\2\content\librarys\com (Zugriff verweigert)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleClassLoader.retrieveFile(BundleClassLoader.java:1039)
at ch.ethz.iks.concierge.framework.BundleClassLoader.findOwnClass(BundleClassLoader.java:615)
at ch.ethz.iks.concierge.framework.BundleClassLoader.findClass(BundleClassLoader.java:567)
at java.lang.ClassLoader.loadClass(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(BundleClassLoader.java:450)
at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(BundleImpl.java:438)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Framework.java:2468)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$0(Framework.java:2428)
at ch.ethz.iks.concierge.framework.Framework.startup(Framework.java:485)
at ch.ethz.iks.concierge.framework.Framework.main(Framework.java:315)
java.lang.ClassNotFoundException: anfang.Activator
at ch.ethz.iks.concierge.framework.BundleClassLoader.findClass(BundleClassLoader.java:600)
at java.lang.ClassLoader.loadClass(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(BundleClassLoader.java:450)
at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(BundleImpl.java:438)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Framework.java:2468)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$0(Framework.java:2428)
at ch.ethz.iks.concierge.framework.Framework.startup(Framework.java:485)
at ch.ethz.iks.concierge.framework.Framework.main(Framework.java:315)
org.osgi.framework.BundleException: Cannot resolve bundle activator Bundle : file:/C:/Bachelorarbeit/.metadata/.plugins/com.buglabs.osgi.concierge.runtime/bundles/Anfang_1.0.0.jar
at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(BundleClassLoader.java:463)
at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(BundleImpl.java:438)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Framework.java:2468)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$0(Framework.java:2428)
at ch.ethz.iks.concierge.framework.Framework.startup(Framework.java:485)
at ch.ethz.iks.concierge.framework.Framework.main(Framework.java:315)
Is there a special permission necessary ?
Unfortunately I've read in the paper about Concierge that it's pretty special to use native librarys with an OSGI framework. So it's hard to find some examples with OSGi and native code. Maybe you know some ?
Thanks in advance
Cheers
Daniel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm trying to develop an application with Concierge OSGI und JOGL using the actual version of Concierge with the BugLabs Eclispe plugin.
But I've got a problem with loading the necessary native code.
My manifest file looks like this:
…
Bundle-NativeCode: lib/jogl_desktop.dll ;
lib/gluegen-rt.dll ;
lib/nativewindow_awt.dll ;
lib/newt.dll ; osname=win32 ; processor=x86
Bundle-ClassPath: .,lib/gluegen-rt.jar,
lib/nativewindow.all.jar,
lib/jogl.all.jar,
lib/newt.all.jar
….
But when I'm starting concierge I always got the following exception:
java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.jogamp.gluegen.runtime.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:102)
at com.jogamp.gluegen.runtime.NativeLibLoader.access$000(NativeLibLoader.java:51)
at com.jogamp.gluegen.runtime.NativeLibLoader$1.run(NativeLibLoader.java:70)
at java.security.AccessController.doPrivileged(Native Method)
at com.jogamp.gluegen.runtime.NativeLibLoader.loadGlueGenRT(NativeLibLoader.java:68)
at com.jogamp.common.jvm.JVMUtil.<clinit>(JVMUtil.java:56)
at javax.media.nativewindow.NativeWindowFactory.<clinit>(NativeWindowFactory.java:102)
at javax.media.opengl.GLProfile.initProfiles(GLProfile.java:855)
at javax.media.opengl.GLProfile.access$000(GLProfile.java:59)
at javax.media.opengl.GLProfile$1.run(GLProfile.java:989)
at java.security.AccessController.doPrivileged(Native Method)
at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:987)
at osgijogl.MainFrame.<init>(MainFrame.java:19)
at osgijogl.Activator.start(Activator.java:16)
at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(BundleImpl.java:446)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Framework.java:2468)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$0(Framework.java:2428)
at ch.ethz.iks.concierge.framework.Framework.startup(Framework.java:485)
at ch.ethz.iks.concierge.framework.Framework.main(Framework.java:315)
org.osgi.framework.BundleException: Error starting bundle Bundle : file:/C:/Bachelorarbeit/.metadata/.plugins/com.buglabs.osgi.concierge.runtime/bundles/OsgiJogl_1.0.0.jar
at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(BundleImpl.java:460)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Framework.java:2468)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$0(Framework.java:2428)
at ch.ethz.iks.concierge.framework.Framework.startup(Framework.java:485)
at ch.ethz.iks.concierge.framework.Framework.main(Framework.java:315)
All of the dll and jar files are in the /lib folder in the bundle.
If I run my bundle with another OSGI framework like Equinox it works fine without problems.
Is there a special way to load native code with the Concierge framework ?
Thx in advance,
Daniel
Hi,
no, it should run just as in every other OSGi framework but I remember there were some bugs in previous versions of Concierge with regard to native code handling. Have you tried the most recent release?
You can also try to run it with debug output enabled by setting -Dch.ethz.iks.concierge.debug=true
This should tell you how the native code directive in your bundle has been interpreted and where it looks for the library.
Cheers,
Jan.
Hi Jan,
thanks for your answer.
Unfortunately I couldn't fix my problem yet. I'm using the current version of Concierge (1.0.0).
I've read in a paper about concierge that you have to extract Jar librarys if they contain native code, I haven't done this at my first tests.
Now I have extracted my librarys but it still doesn't work with a new exception:
purging storage …
INSTALLING file:/C:/eclipseEE/configuration/org.eclipse.osgi/bundles/732/1/.cp/jars/osgi.jar
INSTALLING file:/C:/Bachelorarbeit/.metadata/.plugins/com.buglabs.osgi.concierge.runtime/bundles/Anfang_1.0.0.jar
java.io.FileNotFoundException: .\storage\default\2\content\librarys\com (Zugriff verweigert)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleClassLoader.retrieveFile(BundleClassLoader.java:1039)
at ch.ethz.iks.concierge.framework.BundleClassLoader.findOwnClass(BundleClassLoader.java:615)
at ch.ethz.iks.concierge.framework.BundleClassLoader.findClass(BundleClassLoader.java:567)
at java.lang.ClassLoader.loadClass(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(BundleClassLoader.java:450)
at ch.ethz.iks.concierge.framework.BundleImpl.<init>(BundleImpl.java:196)
at ch.ethz.iks.concierge.framework.Framework.installNewBundle(Framework.java:1083)
at ch.ethz.iks.concierge.framework.Framework.installNewBundle(Framework.java:1051)
at ch.ethz.iks.concierge.framework.Framework.startup(Framework.java:458)
STARTING file:/C:/eclipseEE/configuration/org.eclipse.osgi/bundles/732/1/.cp/jars/osgi.jar
STARTING file:/C:/Bachelorarbeit/.metadata/.plugins/com.buglabs.osgi.concierge.runtime/bundles/Anfang_1.0.0.jar
at ch.ethz.iks.concierge.framework.Framework.main(Framework.java:315)
java.io.FileNotFoundException: .\storage\default\2\content\librarys\com (Zugriff verweigert)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleClassLoader.retrieveFile(BundleClassLoader.java:1039)
at ch.ethz.iks.concierge.framework.BundleClassLoader.findOwnClass(BundleClassLoader.java:615)
at ch.ethz.iks.concierge.framework.BundleClassLoader.findClass(BundleClassLoader.java:567)
at java.lang.ClassLoader.loadClass(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(BundleClassLoader.java:450)
at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(BundleImpl.java:438)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Framework.java:2468)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$0(Framework.java:2428)
at ch.ethz.iks.concierge.framework.Framework.startup(Framework.java:485)
at ch.ethz.iks.concierge.framework.Framework.main(Framework.java:315)
java.lang.ClassNotFoundException: anfang.Activator
at ch.ethz.iks.concierge.framework.BundleClassLoader.findClass(BundleClassLoader.java:600)
at java.lang.ClassLoader.loadClass(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(BundleClassLoader.java:450)
at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(BundleImpl.java:438)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Framework.java:2468)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$0(Framework.java:2428)
at ch.ethz.iks.concierge.framework.Framework.startup(Framework.java:485)
at ch.ethz.iks.concierge.framework.Framework.main(Framework.java:315)
org.osgi.framework.BundleException: Cannot resolve bundle activator Bundle : file:/C:/Bachelorarbeit/.metadata/.plugins/com.buglabs.osgi.concierge.runtime/bundles/Anfang_1.0.0.jar
at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(BundleClassLoader.java:463)
at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(BundleImpl.java:438)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Framework.java:2468)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$0(Framework.java:2428)
at ch.ethz.iks.concierge.framework.Framework.startup(Framework.java:485)
at ch.ethz.iks.concierge.framework.Framework.main(Framework.java:315)
Is there a special permission necessary ?
Unfortunately I've read in the paper about Concierge that it's pretty special to use native librarys with an OSGI framework. So it's hard to find some examples with OSGi and native code. Maybe you know some ?
Thanks in advance
Cheers
Daniel