exception in jogl rc7 and above in linux-i586

Hi,
I’m having problems running jogl 1.1.1 under Linux. It’s Linux/Debian, and I’m using Java 6 and Xith3D scenegraph.
I get an exception when running my app with newest versions of JOGL (I’m using linux-i586 version):

Exception in thread “AWT-EventQueue-0” java.lang.ClassCastException: java.nio.DirectByteBuffer cannot be cast to com.sun.opengl.impl.x11.JAWT_X11DrawingSurfaceInfo
at com.sun.opengl.impl.x11.X11OnscreenGLDrawable.lockSurface(X11OnscreenGLDrawable.java:152)
at com.sun.opengl.impl.x11.X11OnscreenGLContext.makeCurrentImpl(X11OnscreenGLContext.java:61)
at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134)
at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:182)
at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:412)
at javax.media.opengl.GLCanvas.display(GLCanvas.java:244)
at javax.media.opengl.GLCanvas.paint(GLCanvas.java:277)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
at sun.awt.X11.XRepaintArea.paintComponent(XRepaintArea.java:56)
at sun.awt.RepaintArea.paint(RepaintArea.java:224)
at sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:695)
at java.awt.Component.dispatchEventImpl(Component.java:4706)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

I’m getting jogl from: http://download.java.net/media/jogl/builds/archive/
Now, the problem exists when I use 1.1.1-rc7 or above. What I could notice is that from rc7 and up the jogl_awt.so changed (used to be 9772b in size, then changed to 8997b in rc7). Also, if you look into the jars with native libs for webstart (jogl-natives-linux-i586.jar) and the zips with OS-specific distrubutions (jogl-1.1.1-rc[56]-linux-i586.zip) then at least for rc5 and rc6 webstart jars contain different jogl_awt.so (8997b size) than the OS-specific archives (9772b). Looking at the changes in files, it would suggest some inconsistency with packaging.

However, I can successfully run any new version (incl. 1.1.1a) of JOGL if I take the 9772b jogl_awt.so from jogl-1.1.1-rc6-linux-i586.zip and replace the original .so lib bundled in distribution. This however seems a bit of a hack, therefore I’d like to ask if this is any known problem. As of doing my homework - yes, I’ve asked Google for the exception message and it returns only few results and no answer applies to me, so after spending few hours tracking the source of problem I’m asking the wise men (and women :wink: ) here.
Thanks & regards

Why don’t you use JOGL 1.1.1a as it works? I use it under Mandriva Linux and everything is ok (except the fullscreen bug of KDE 4.3/4.4).

Well, I do use 1.1.1a but to make it work I needed to overwrite jogl_awt.so with the one from 1.1.1-rc6. This is not a show-stopper for me but I wonder why the official build archives seem inconsistent and I’m a bit concerned about stability…

You should not need to do this. Make some cleanup on your machine. I already used JOGL 1.1.1a even on other versions of Linux including Ubuntu, Fedora 10, etc… and I did not have such problems. In my humble opinion, another JAR or another native modules (.so) is somewhere in a directory in your class path. Don’t put JARs and native modules in your JVM and try my game (or another application relying on JOGL 1.1.1a) to check if JOGL 1.1.1a really works on your machine.

OK, you’re right :slight_smile:
One of the projects (Netbeans) referenced by my project did include jogl.jar… an older version…
Fortunately adding -verbose:class to cmd-line helped find the traitor :wink:
So: BIG thanks for help.
Regards

You’re welcome. I’m glad to see you solved your problem. I have used JOGL for years and I would not use it if it did not work on Linux. You should look at this too, you’re concerned as you use Linux:
http://www.java-gaming.org/index.php/topic,22108.msg182544.html#msg182544