Applet throwing NoSuchMethodException

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

Applet throwing NoSuchMethodException

WarrenFaith
This post was updated on .
Hi,

I have tried dozen ways of creating an applet with JOGL but the result is always the same: I get a NoSuchMethodException when I try to create an instance of GLCanvas.

Java code:
GLProfile glp = GLProfile.get(GLProfile.GL2ES2);

GLCapabilities caps = new GLCapabilities(glp);
caps.setSampleBuffers(true);
caps.setNumSamples(8);

glCanvas = new GLCanvas(caps); // crashes here, worked when started as applet in eclipse

My applet code
<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
      width="660"
      height="500"
      archive="http://jogamp.org/deployment/util/applet-launcher.jar,
               http://jogamp.org/deployment/webstart/nativewindow.all.jar,
               http://jogamp.org/deployment/webstart/jogl.all.jar,
               http://jogamp.org/deployment/webstart/gluegen-rt.jar,
               http://jogamp.org/deployment/webstart/newt.all.jar,
               http://192.168.0.39/benchmark.jar">
   <param name="codebase_lookup" value="false">
   <param name="subapplet.classname" value="de.beuthhochschule.bachelor.martin.Benchmark">
   <param name="subapplet.displayname" value="Benchmark">
   <param name="noddraw.check" value="true">
   <param name="progressbar" value="true">
   <param name="website" value="http://www.lagence3d.com/products/udo3/" />
   <param name="websitesql" value="http://www.udo-construction.com/dev/scripts/" />
   <param name="jnlpNumExtensions" value="1">
   <param name="jnlpExtension1"
          value="http://download.java.net/media/jogl/jsr-231-2.x-webstart/jogl-core.jnlp">
   <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
   <param name="jnlp_href" value="applet-benchmark.jnlp">
</applet>

My JNLP code:
<?xml version="1.0" encoding="utf-8"?>
<jnlp href="applet-benchmark.jnlp">
    <information>
        <title>WebGL-Benchmark</title>
        <vendor>Martin Breuer</vendor>
        <homepage href="http://192.168.0.39/"/>
        <description>Native reference implementation</description>
        <description kind="short">Reference implementation of the WebGL Benchmark</description>
        <offline-allowed/>
    </information>
    <security>
        <all-permissions/>
    </security>
    <resources>
      <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
      <property name="sun.java2d.noddraw" value="true"/>
      <jar href="http://192.168.0.39/benchmark.jar" main="true"/>
      <extension name="jogl-all-awt" href="http://jogamp.org/deployment/webstart-next/jogl-all-awt.jnlp" /> 
    </resources>
    <applet-desc 
        name="WebGL-Benchmark"
        main-class="de.beuthhochschule.bachelor.martin.Benchmark"
        width="660" 
        height="500">
    </applet-desc>
</jnlp>

And finally the java console output (its too much, so I used pastebin): http://pastebin.com/xjk84pTV

I am totally lost...

*edit*
Before asking: When I use the JNLP of the GEARS demo, I can see the demo applet. So basically it should be working...
Reply | Threaded
Open this post in threaded view
|

Re: Applet throwing NoSuchMethodException

Sven Gothel
Administrator
On Wednesday, January 26, 2011 02:47:56 WarrenFaith [via jogamp] wrote:
>
> Hi,
>
> I have tried dozen ways of creating an applet with JOGL but the result is
> always the same: I get a NoSuchMethodException when I try to create an
> instance of GLCanvas.

looks all great .. however,
since we have changed the API (GLCapabilities -> GLCapabilitiesImmutable).

You need to recompile (w/o source code change) .. sorry about that.

You compiled classes reference
        cstr 'GLCanvas(javax.media.opengl.GLCapabilities)',
which is now
        cstr 'GLCanvas(javax.media.opengl.GLCapabilitiesImmutable)'

---
#
Exception in thread "thread applet-de.beuthhochschule.bachelor.martin.Benchmark-1" java.lang.NoSuchMethodError: javax.media.opengl.awt.GLCanvas.<init>(Ljavax/media/opengl/GLCapabilities;)V
#
        at de.beuthhochschule.bachelor.martin.Benchmark.initComponents(Benchmark.java:60)
---

http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/awt/GLCanvas.html#GLCanvas%28javax.media.opengl.GLCapabilitiesImmutable%29

~Sven

>
> Java code:
> GLProfile glp = GLProfile.get(GLProfile.GL2ES2);
>
> GLCapabilities caps = new GLCapabilities(glp);
> caps.setSampleBuffers(true);
> caps.setNumSamples(8);
>
> glCanvas = new GLCanvas(caps); // crashes here, worked when started as
> applet in eclipse
>
> My applet code
> <applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
>       width="660"
>       height="500"
>       archive="http://jogamp.org/deployment/util/applet-launcher.jar,
>                http://jogamp.org/deployment/webstart/nativewindow.all.jar,
>                http://jogamp.org/deployment/webstart/jogl.all.jar,
>                http://jogamp.org/deployment/webstart/gluegen-rt.jar,
>                http://jogamp.org/deployment/webstart/newt.all.jar,
>                http://192.168.0.39/benchmark.jar">
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
> </applet>
>
> My JNLP code:
> <?xml version="1.0" encoding="utf-8"?>
> <jnlp href="applet-benchmark.jnlp">
>     <information>
>         <title>WebGL-Benchmark</title>
>         <vendor>Martin Breuer</vendor>
>         <homepage href="http://192.168.0.39/"/>
>         <description>Native reference implementation</description>
>         <description kind="short">Reference implementation of the WebGL
> Benchmark</description>
>         <offline-allowed/>
>     </information>
>     <security>
>         <all-permissions/>
>     </security>
>     <resources>
>       <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
>       <property name="sun.java2d.noddraw" value="true"/>
>       <jar href="http://192.168.0.39/benchmark.jar" main="true"/>
>       <extension name="jogl-all-awt"
> href="http://jogamp.org/deployment/webstart-next/jogl-all-awt.jnlp" />
>     </resources>
>     <applet-desc
>         name="WebGL-Benchmark"
>         main-class="de.beuthhochschule.bachelor.martin.Benchmark"
>         width="660"
>         height="500">
>     </applet-desc>
> </jnlp>
>
> And finally the java console output (its too much, so I used pastebin):
> http://pastebin.com/xjk84pTV
>
> I am totally lost...
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://jogamp.762907.n3.nabble.com/Applet-throwing-NoSuchMethodException-tp2335825p2335825.html
> To start a new topic under jogl, email [hidden email]
> To unsubscribe from jogl, visit
health & wealth
mailto:
[hidden email] ; http://jausoft.com
land : +49 (471) 4707742 ; cell: +49 (151) 28145941
Timezone CET: PST+9, EST+6, UTC+1
Reply | Threaded
Open this post in threaded view
|

Re: Applet throwing NoSuchMethodException

WarrenFaith
I can't believe it! I know I checked that the constructor I use is really in the API, but I somehow missed the "Immutable" end...
And the reason why it works in eclipse is pretty simple: My good professor at my university used old JOGL libs where these changes are not yet made.
So I was using old stuff in eclipse while downloading the newest one with the applets... GREAT!

Sven: You saved my bachelor thesis! Really (already made a WebGL Benchmark, now I can finally port the benchmark to Java...)

Anyway, I figured out that the newt.jnlp that can be found here http://jogamp.org/deployment/jogamp-next/ has broken links inside. There is no "newt.x11.jar" it must be "newt.os.x11.jar". I guess you as a maintainer can fix that :)

Thanks from Berlin!
Martin
Reply | Threaded
Open this post in threaded view
|

Re: Applet throwing NoSuchMethodException

Sven Gothel
Administrator
On Wednesday, January 26, 2011 03:23:32 WarrenFaith [via jogamp] wrote:

>
> I can't believe it! I know I checked that the constructor I use is really in
> the API, but I somehow missed the "Immutable" end...
> And the reason why it works in eclipse is pretty simple: My good professor
> at my university used old JOGL libs where these changes are not yet made.
> So I was using old stuff in eclipse while downloading the newest one with
> the applets... GREAT!
>
> Sven: You saved my bachelor thesis! Really (already made a WebGL Benchmark,
> now I can finally port the benchmark to Java...)

AWESOME .. can you post URLs and is it open source ?

Would love to add you stuff in our 'collection'.

It might be also great to use your benchmark to test JOGL performance regressions ?

Please share .. thank you.

>
> Anyway, I figured out that the newt.jnlp that can be found here
> http://jogamp.org/deployment/jogamp-next/ has broken links inside. There is
> no "newt.x11.jar" it must be "newt.os.x11.jar". I guess you as a maintainer
> can fix that :)

Oh .. I earmark this, but just in case - please file a bugreport, thx.

>
> Thanks from Berlin!

Greetings from fishtown :)

~Sven

> Martin
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://jogamp.762907.n3.nabble.com/Applet-throwing-NoSuchMethodException-tp2335825p2351066.html
> To start a new topic under jogl, email [hidden email]
> To unsubscribe from jogl, visit
health & wealth
mailto:
[hidden email] ; http://jausoft.com
land : +49 (471) 4707742 ; cell: +49 (151) 28145941
Timezone CET: PST+9, EST+6, UTC+1
Reply | Threaded
Open this post in threaded view
|

Re: Applet throwing NoSuchMethodException

WarrenFaith
I can post a link to it, of course. Its not really open source but I can publish the code after my bachelor deadline.

The benchmark itself is not very complex and targets the performance of webgl. The java implementation is only there for a reference as how the performance would be with a desktop/applet application. But it can be extended to check the JOGL performance as well, I think.

Anyway I will publish it here, I promise :)
Reply | Threaded
Open this post in threaded view
|

Re: Applet throwing NoSuchMethodException

WarrenFaith
Hi,

my benchmark for WebGL is ready. The reference implementation with java doesn't really use a lot of jogl so its basically just a reference to webgl than a jogl benchmark, but you wanted to be informed about it anyway.

The link: WebGL Benchmark

Greetings