Applet reloads

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Applet reloads

Gerco
Hi,

I'm developing a JOGL applet for the company I work for, and we occaisionally encounter three types JOGL exceptions when the browser tries to reload the  applet, specifically:

* ExceptionInInitializerError (caused by a GLException: No profile available: [GL2, GL2ES2, GL2ES1, GLES2, GLES1, GL2GL3, GL3])
* UnsatisfiedLinkError: Native Library C:\Users\gba.UTRECHT\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\47\173457af-2972baab-n\nativewindow_jvm.dll already loaded in another classloader
* UnsatisfiedLinkError: com.sun.gluegen.runtime.CPU.getPointerSizeInBits()I

Has anyone had any similar experiences or suggestions? Only restarting the browser or going to another page and waiting for a while seems to alleviate the problem once it occurs.

With regards,
Gerco.
Reply | Threaded
Open this post in threaded view
|

Re: Applet reloads

Wade Walker
Administrator
Which OS and browser version? I can run a test to see if I can duplicate this.
Reply | Threaded
Open this post in threaded view
|

Re: Applet reloads

Gerco
At least on Windows 7, both with Firefox (5 and 6) and IE. Java 1.6 (various builds).
Reply | Threaded
Open this post in threaded view
|

Re: Applet reloads

Sven Gothel
Administrator
On Wednesday, August 24, 2011 10:23:12 AM Gerco [via jogamp] wrote:
>
> At least on Windows 7, both with Firefox (5 and 6) and IE. Java 1.6 (various
> builds).

can you elaborate a bit more on the java JRE/plugin please ?

[1] JNLP2 Applets (plugin2):
  AFAIK, the plugin2 (as I worked on it) duplicates all JNLP
  native library JARs in a unique temp folder, which makes them .. unique.
  Hence it loads the DSO (dll, so, ..) in a unique fashion
  so that the shown error does not appear (loaded by other classloader).

[2] AppletLauncher (our branch - loading JNLP/Applets for non plugin2):
  It does the same thing as described above.

[3] Old fashion Applet:
  The experience may vary ... depending on the implementation.
  Plugin2 shall behave as described above.

Seeing the actual browser and java debug logs would be pretty helpful.
At least you could specify which applet loading mechanism you have used
and you might want to try the AppletLauncher mechanism if you haven't tried yet.

Pls let us know ..

Cheers, Sven
Reply | Threaded
Open this post in threaded view
|

Re: Applet reloads

Gerco
I'm not sure if these complete answer your question, but here goes:

Snippet from HTML page:

<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
    width=900
    height=600
    MAYSCRIPT
    archive="applet-launcher/applet-launcher.jar,
                 jogl/jsr-231-2.x-webstart/jogl.all.jar,
                 gluegen/webstart-2.x/gluegen-rt.jar,
                 loftdisplayapplet.jar"
    name="LoftDisplayApplet" ID="LoftDisplayApplet">
  <paramx name="codebase_lookup"  value="false"/>
  <paramx name="subapplet.classname"  value="com.nedsense.loft.applet.AppletDisplay"/>
  <paramx name="subapplet.displayname"  value="Loft Display applet"/>
  <paramx name="noddraw.check"  value="true"/>
  <paramx name="progressbar"  value="true"/>                                                               
  <paramx name="java_arguments"  value="-Dsun.java2d.noddraw=true -Xms256M -Xmx1024M -Djnlp.packEnabled=true"/>
  <paramx name="jnlp_href"  value="applet.jnlp"/>
  <paramx name="sceneServerBaseURL"  value="http://localhost:8000/display-data/" />
  <paramx name="contentServerBaseURL"  value="http://localhost:8000/display-data/" />
  <paramx name="scene"  value="2" />

  Your browser does not support Java. Please go to www.java.com to install Java on your computer.

</applet>

Note changed param into paramx to make them visible in this posting.

Contents of JNLP file:

<?xml version="1.0" encoding="utf-8"?>
<jnlp codebase="" href="applet.jnlp">

    <information>
        <title>Loft Display</title>
        <vendor>NedSense/LOFT</vendor>
        <homepage href="http://www.nedsense.com/english/default.asp" />
        <description>Loft Display</description>
        <offline-allowed />
    </information>

    <resources>
        <j2se href="http://java.sun.com/products/autodl/j2se" version="1.6+" />
        <property name="sun.java2d.noddraw" value="true" />
        <property name="jnlp.packEnabled" value="true"/>
        <jar href="loftdisplayapplet.jar" main="true" />
        <jar href="segmentation-external.jar" />
        <jar href="cleaning-external.jar" />
        <extension name="jogl-all" href="jogl/jsr-231-2.x-webstart/jogl-all.jnlp" />
        <extension name="gluegen-rt" href="gluegen/webstart-2.x/gluegen-rt.jnlp" />
    </resources>

    <applet-desc
        name="LoftDisplayApplet"
        main-class="com.nedsense.loft.applet.AppletDisplay"
        width="614"
        height="462">
    </applet-desc>

</jnlp>

Note: we use a local copy of the JNLP/JAR files for performance/stability reasons...

Thanks,
Gerco.