Login  Register

Error running JOGL from webstart

Posted by bjorn on Sep 22, 2011; 1:52pm
URL: https://forum.jogamp.org/Error-running-JOGL-from-webstart-tp3358835.html

Hello!

We have got a JOGL application that used to refer to the jogl jnlp at http://download.java.net/.... It worked fine. As for many others it stopped working when Oracle unsigned the corresponding jar files recently.

So, we decided first of all to host all the required files on our own server as "external" web access cannot be assumed (anymore) for all the clients using the application. It will typically be used within intranets. However that doesn't seem to matter to the problem at hand.

Secondly we updated JOGL 1.1.1.a to 2.0rc3 (seems speedier :-)  

Now the problem is that the native libs are not loading properly when using webstart. Running it locally works fine (explicitly referring the native libs). Using webstart we get the not so uncommon exception:

"java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path"

Anyone have any ideas? Something I should test? Using the jogamp url for the jogl extension render the same error (see below). Webstart cache is cleared in-between runs. I will create a simple test (like the OneTriangle Demo) and run it within our environment.

Many Thanks!
Björn

* * *

The main jnlp:

<jnlp spec="1.0+" codebase="http://localhost:8080/xxx/">
  <information>
    [...]
  </information>
  <update check="always" policy="always"/>
  <resources>
    <java java-vm-args="-Xmx512m" version="1.6"/>
    <jar href="http://localhost:8080/xxx/app_login_client.jar" download="eager" main="false"/>
    <extension href="http://localhost:8080/xxx/jogl_extension.jnlp"/>
    <property name="sun.java2d.noddraw" value="true"/>
  </resources>
  <application-desc main-class="...">
 [...]
  </application-desc>
</jnlp>

the (generated) jogl_extension jnlp for linux:

<jnlp spec="1.0+" codebase="http://localhost:8080/xxx/" href="http://localhost:8080/xxx/jogl_extension.jnlp">
  <information>
    [...]
  </information>
  <security>
    <all-permissions/>
  </security>
  <update check="timeout" policy="always"/>
  <resources>
    <jar href="http://localhost:8080/xxx/gluegen-rt.jar" download="eager" main="false"/>
    <jar href="http://localhost:8080/xxx/jogl.all.jar" download="eager" main="false"/>
    <nativelib href="http://localhost:8080/xxx/gluegen-rt-natives-linux-i586.jar" download="eager" main="false"/>
    <nativelib href="http://localhost:8080/xxx/jogl-all-natives-linux-i586.jar" download="eager" main="false"/>
  </resources>
  <component-desc/>
</jnlp>


Some observations:

using

<extension name="jogl-all-awt" href="http://jogamp.org/deployment/jogamp-current/jogl-all-awt.jnlp" />

instead of the locally referred files is rendering the same error.

The libs are unpacked properly it seems by webstart and placed in webstart cache:

~/.java/deployment/cache/6.0/$ find . -iname lib*
./37/6a7045a5-4c634ef7-n/libnewt.so
./37/6a7045a5-4c634ef7-n/libjogl_mobile.so
./37/6a7045a5-4c634ef7-n/libnativewindow_x11.so
./37/6a7045a5-4c634ef7-n/libjogl_desktop.so
./37/6a7045a5-4c634ef7-n/libnativewindow_awt.so
./26/19810c9a-1183d137-n/libgluegen-rt.so

And the stack trace:

Caused by: java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1028)
        at com.jogamp.gluegen.runtime.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:117)
        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.opengl.GLProfile.<clinit>(GLProfile.java:1145)
        at javax.media.opengl.awt.GLJPanel.<init>(GLJPanel.java:245)
        at javax.media.opengl.awt.GLJPanel.<init>(GLJPanel.java:215)
        at javax.media.opengl.awt.GLJPanel.<init>(GLJPanel.java:206)