World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Development Help

Development Help Help for building applications or diagnosing problems with WWJ

Reply
 
Thread Tools Display Modes
Old 07-24-2007, 08:16 PM   #1
rogene
Scientist and Entrepreneur
 
Join Date: May 2007
Location: Washington State, USA
Posts: 75
rogene is on a distinguished road
Default Runtime Exception: WorldWindowGLAutoDrawable

Hello,

I am looking for some hints as to the source of this applet runtime error ---

<html>
<applet code=DemoApplet.class
archive="DemoApplet.jar, worldwind.jar, gluegen-rt.jar, jogl.jar"
</applet>
</html>

Code:
gov.nasa.worldwind.WWRuntimeException: Unable to create WorldWindow
	at gov.nasa.worldwind.awt.WorldWindowGLJPanel.<init>(Unknown Source)
	at DemoApplet.createWindow(DemoApplet.java:25)
	at DemoApplet.init(DemoApplet.java:37)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
	at javax.media.opengl.GLJPanel.setAutoSwapBufferMode(GLJPanel.java:812)
	at gov.nasa.worldwind.WorldWindowGLAutoDrawable.<init>(Unknown Source)
	... 5 more
gov.nasa.worldwind.WWRuntimeException: Unable to create WorldWindow
	at gov.nasa.worldwind.awt.WorldWindowGLJPanel.<init>(Unknown Source)
	at DemoApplet.createWindow(DemoApplet.java:25)
	at DemoApplet.init(DemoApplet.java:37)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
	at javax.media.opengl.GLJPanel.setAutoSwapBufferMode(GLJPanel.java:812)
	at gov.nasa.worldwind.WorldWindowGLAutoDrawable.<init>(Unknown Source)
	... 5 more
Thanks!
rogene is offline   Reply With Quote
Old 07-25-2007, 12:44 AM   #2
toolshed
Senior Member
 
Join Date: Jun 2007
Posts: 109
toolshed is on a distinguished road
Default

Quote:
Originally Posted by rogene View Post
Code:
gov.nasa.worldwind.WWRuntimeException: Unable to create WorldWindow
	at gov.nasa.worldwind.awt.WorldWindowGLJPanel.<init>(Unknown Source)
Look here
toolshed is offline   Reply With Quote
Old 07-25-2007, 01:21 AM   #3
patmurris
WWJ Consultant
 
patmurris's Avatar
 
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
patmurris is an unknown quantity at this point
Default

Do you have jogl in the classpath for the applet ?
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris is offline   Reply With Quote
Old 07-25-2007, 01:51 AM   #4
rogene
Scientist and Entrepreneur
 
Join Date: May 2007
Location: Washington State, USA
Posts: 75
rogene is on a distinguished road
Default class not found

Thanks!

I changed the applet tag as such:

Code:
<applet code="com.sun.opengl.util.JOGLAppletLauncher"
		width=800
		height=600

		codebase="file:\\C:\Users\rogene\Desktop\runme\"

		archive="jogl.jar,gluegen-rt.jar,worldwind.jar,BasicDemo.jar,DemoApplet.jar">
	<param name="subapplet.classname" VALUE="DemoApplet">
	<param name="subapplet.displayname" VALUE="WorldWind">
	<param name="progressbar" value="true">
	<param name="cache_archive" VALUE="jogl.jar,gluegen-rt.jar,worldwind.jar,BasicDemo.jar,DemoApplet.jar">
	<param name="cache_archive_ex" VALUE="jogl.jar;preload,gluegen-rt.jar;preload,worldwind.jar;preload,BasicDemo.jar;preload,DemoApplet.jar;preload">
</applet>
And the runtime error goes away. However, I think that I must have an error in the codebase because the error now is that the DemoApplet class isn't found.

I have tried several variations on the codebase definition based on what I saw others post. I am debugging from a folder off the desktop, rather than on a webserver. I just started digging around on the Sun site to see if I could find some additional pointers, as this now appears to be a Java issue, rather than a Worldwind issue.

I am *not* running this on a Mac, which was related to a problem that another ww poster described.
rogene is offline   Reply With Quote
Old 07-25-2007, 03:09 AM   #5
rogene
Scientist and Entrepreneur
 
Join Date: May 2007
Location: Washington State, USA
Posts: 75
rogene is on a distinguished road
Default by the way...

I have tried using
codebase = "."
as well as deleting the reference to it completely
rogene is offline   Reply With Quote
Old 07-25-2007, 09:44 AM   #6
pred
Member
 
Join Date: May 2007
Posts: 57
pred is on a distinguished road
Default

Code:
<param name="subapplet.classname" VALUE="DemoApplet">
Is your DemoApplet class in a java package ?
type exemplepackage.DemoApplet if so.
__________________
-Stephane Maldini- Thales Alenia Space, GMES program, Toulouse, France-
pred is offline   Reply With Quote
Old 07-25-2007, 11:19 AM   #7
patmurris
WWJ Consultant
 
patmurris's Avatar
 
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
patmurris is an unknown quantity at this point
Default

Sun recommend using the new JNLPAppletLauncher instead of JOGLAppletLauncher.
One of the main advantages is you dont need to host copies of all versions of jogl and gluegen. You can point to Sun servers. Same for the launcher itself.
https://applet-launcher.dev.java.net/
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris is offline   Reply With Quote
Old 07-25-2007, 01:03 PM   #8
pred
Member
 
Join Date: May 2007
Posts: 57
pred is on a distinguished road
Default

Quote:
Originally Posted by patmurris View Post
Sun recommend using the new JNLPAppletLauncher instead of JOGLAppletLauncher.
One of the main advantages is you dont need to host copies of all versions of jogl and gluegen. You can point to Sun servers. Same for the launcher itself.
https://applet-launcher.dev.java.net/
JNLP Launcher seems better for those who don't develop on some platform like me because there is a serious issue with JNLP core. JNLP applet tag parser seems not understand xml standard declaration like this :
Code:
<applet ....>
<param />
<param />
</applet>
JSP 2.0 or later can't understand old HTML tag and throws a fatal error, JNLP only understand old HTML tag and crash on xml standard ...
__________________
-Stephane Maldini- Thales Alenia Space, GMES program, Toulouse, France-
pred is offline   Reply With Quote
Old 07-25-2007, 01:10 PM   #9
pred
Member
 
Join Date: May 2007
Posts: 57
pred is on a distinguished road
Default

To force creation of wwd, use WorldWindGLCanvas instead of WorldWindGLJPanel, the second one seems not working at all.
__________________
-Stephane Maldini- Thales Alenia Space, GMES program, Toulouse, France-
pred is offline   Reply With Quote
Old 07-25-2007, 06:30 PM   #10
rogene
Scientist and Entrepreneur
 
Join Date: May 2007
Location: Washington State, USA
Posts: 75
rogene is on a distinguished road
Default 3 suggestions

Thanks for the great ideas!

1) Use Canvas instead of JPanel
Will this be a problem if I am using JApplet? I had planned to use Swing components. Any issues mixing heavyweight and lightweight components, i.e. can I add the Canvas directly to my contentPane?

2) Use full package name in the subapplet.classname value
I am not using a package at this time. Should I be?

3) Use the new JNLPAppletLauncher instead of JOGLAppletLauncher
I am just learning about this now. I spent some time on SUN's forums but each page was S-L-O-W and I could never get the site to allow me to post a message. Many of the messages have been sitting out there without reply for quite a while. There is a forum at javagaming.org that is on a fast(er) server and has an active community.

Have any of you used the JNLP version of the AppletLauncher? I am running on two platforms - my quick debugs are on Windows Vista and my dev web server is 64-bit Linux with Apache and Tomcat.

Thanks so much!
rogene is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
type initializer for Utility.Log throw exception prcooper Install Support 3 03-06-2007 04:58 PM
common language Runtime Debugging Unregistered Bug Reports 1 05-29-2006 08:22 PM
common language runtime probleme Unregistered Install Support 1 05-22-2006 08:29 PM
WorldWind.exe-Commen Language Runtime Debugging Se bobby_delhi Bug Reports 10 04-20-2006 10:01 PM
Exception error detail Guest_Robert_* Technical Support 2 03-01-2006 01:12 AM


All times are GMT +1. The time now is 06:13 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.