InvocationTargetException

I suddenly get this error on my Windows machine:

I reinstalled Java and removed any old class files or caches so it shouldn’t be that. Anyone know what this is?

Exception in thread “AWT-EventQueue-0” javax.media.opengl.GLException: java.lang.reflect.InvocationTargetException
at javax.media.opengl.GLCanvas.disableBackgroundErase(GLCanvas.java:352)
at javax.media.opengl.GLCanvas.addNotify(GLCanvas.java:154)
at java.awt.Container.addNotify(Container.java:2500)
at javax.swing.JComponent.addNotify(JComponent.java:4478)
at java.awt.Container.addNotify(Container.java:2500)
at javax.swing.JComponent.addNotify(JComponent.java:4478)
at java.awt.Container.addNotify(Container.java:2500)
at javax.swing.JComponent.addNotify(JComponent.java:4478)
at java.awt.Container.addNotify(Container.java:2500)
at javax.swing.JComponent.addNotify(JComponent.java:4478)
at java.awt.Container.addNotify(Container.java:2500)
at javax.swing.JComponent.addNotify(JComponent.java:4478)
at java.awt.Container.addNotify(Container.java:2500)
at javax.swing.JComponent.addNotify(JComponent.java:4478)
at javax.swing.JRootPane.addNotify(JRootPane.java:680)
at java.awt.Container.addNotify(Container.java:2500)
at java.awt.Window.addNotify(Window.java:466)
at java.awt.Frame.addNotify(Frame.java:501)
at java.awt.Window.pack(Window.java:484)
at sonarexplorer.SonarExplorerController$5.run(SonarExplorerController.java:110)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javax.media.opengl.GLCanvas.disableBackgroundErase(GLCanvas.java:350)
… 26 more
Caused by: java.lang.UnsatisfiedLinkError: disableNativeBackgroundErase
at sun.awt.windows.WCanvasPeer.disableNativeBackgroundErase(Native Method)
at sun.awt.windows.WCanvasPeer.disableBackgroundErase(WCanvasPeer.java:114)
at sun.awt.windows.WToolkit.disableBackgroundErase(WToolkit.java:376)
… 31 more

I’m sorry about this. It looks like the bug fix for 6333613 was backported to the 5.0 update release train in 5.0 update 10 and an accident caused a piece of the bug fix to be lost. We’ll correct this as quickly as possible. Sorry also for the fact that it doesn’t look like there’s an easy way to download the standalone 5.0 update 9 JDK as a workaround. If necessary you could either use the JDK 6 weekly builds or the latest 1.4.2 update release.

One of the release engineers at Sun pointed out that the 5.0 update 9 JDK is still available at this link, which can also be reached from the archived releases page.

That worked nicely. I thought it might be my program that used too much memory so I was starting to debug my program, but luckily it wasn’t. ;D

Hi, What’s the status of this bug

The QA team from GameTrust has reported to me crashes of my game with that stacktrace… looks like a showstopper for Jack Flowers :frowning:

Lilian

It’s already been worked around in JOGL 1.1.0-rc1.

cool, thanks !

I’ve switched to that version, and everything works fine (I haven’t tested the applet yet)

Lilian :slight_smile:

I got the same exception to my applet. It was working quite good with the earlier versions of jre. Since it is an applet, “use the previous version” solution doesn’t work me because all users’ jre’s are automatically updated.

My applet was a dance simulation. http://www.ccd.rpi.edu/Eglash/csdt/subcult/brdance/software/dancer.html

What should I do to fix it? We need to fix it urgently.

Thanks in advance.

Update to the latest release version of JOGL. Either the current 1.1.0-rc2 or the previous 1.1.0-rc1 works around this bug.

Thanks for your reply, Ken.
I copied the latest release of jogl.jar and other binaries to the required folder, and built the project.

This time I get the error of


java.io.FileNotFoundException: C:\Documents and Settings\Administrator\IdeaProjects\dancer\gluegen-rt-natives-windows-i586.jar (The system cannot find the file specified)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:106)
	at java.io.FileInputStream.<init>(FileInputStream.java:66)
	at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
	at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
	at com.sun.opengl.util.JOGLAppletLauncher.saveNativesJarLocally(JOGLAppletLauncher.java:740)
	at com.sun.opengl.util.JOGLAppletLauncher.refreshJOGL(JOGLAppletLauncher.java:630)
	at com.sun.opengl.util.JOGLAppletLauncher.access$100(JOGLAppletLauncher.java:156)
	at com.sun.opengl.util.JOGLAppletLauncher$4.run(JOGLAppletLauncher.java:401)
Unable to install the native file locally

It has passed about 6 months since I wrote my last code in JOGL so I can’t figure out what is going on now. Am I supposed to do smt. with gluegen-rt-natives-windows-i586.jar or what?

Thanks,

Yes, the requirements of the JOGLAppletLauncher changed in JOGL 1.1.0. See the javadoc for the applet launcher class. Basically, you need to download and unpack the GlueGen runtime jar files from the latest release build of that project and host those jar files on your server alongside jogl.jar and the jogl-natives jars.

thanks Ken.

Everything works fine now…