PDA

View Full Version : Problems with Applet Deploy in 0.3.0


rogene
10-15-2007, 12:33 AM
I am experiencing a runtime error with my Applet since updating to 0.3.0. The application version of the code runs fine. I get the same error regardless of whether I compile/package under linux or vista, and the exception is thrown in multiple browsers and Java's AppletViewer.

FWIW, I started this thread under 0.3.0 Release Announcements, and I am moving it here as it seems to be non-related to the JOGL dist issue.

Exception in thread "AWT-EventQueue-2" java.lang.ExceptionInInitializerError
at gov.nasa.worldwind.WorldWind.createConfi gurationComponent(Unknown Source)
at gov.nasa.worldwind.WorldWind.initialize( Unknown Source)
at gov.nasa.worldwind.WorldWind.<init>(Unkn own Source)
at gov.nasa.worldwind.WorldWind.<clinit>(Un known Source)
at gov.nasa.worldwind.awt.WorldWindowGLCanv as.<init>(Unknown Source)
at DemoApplet.init(DemoApplet.java:24)
at org.jdesktop.applet.util.JNLPAppletLaunc her.startSubApplet(JNLPAppletLauncher.ja va:1889)
at org.jdesktop.applet.util.JNLPAppletLaunc her.access$200(JNLPAppletLauncher.java:6 50)
at org.jdesktop.applet.util.JNLPAppletLaunc her$5.run(JNLPAppletLauncher.java:1261)
at java.awt.event.InvocationEvent.dispatch( InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQ ueue.java:597)
at java.awt.EventDispatchThread.pumpOneEven tForFilters(EventDispatchThread.java:273 )
at java.awt.EventDispatchThread.pumpEventsF orFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsF orHierarchy(EventDispatchThread.java:173 )
at java.awt.EventDispatchThread.pumpEvents( EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents( EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDi spatchThread.java:121)
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission gov.nasa.worldwind.config.file read)
at java.security.AccessControlContext.check Permission(AccessControlContext.java:323 )
at java.security.AccessController.checkPerm ission(AccessController.java:546)
at java.lang.SecurityManager.checkPermissio n(SecurityManager.java:532)
at java.lang.SecurityManager.checkPropertyA ccess(SecurityManager.java:1285)
at java.lang.System.getProperty(System.java :688)
at gov.nasa.worldwind.Configuration.initial izeCustom(Unknown Source)
at gov.nasa.worldwind.Configuration.<init>( Unknown Source)
at gov.nasa.worldwind.Configuration.<clinit >(Unknown Source)

After commenting out all but the most basic function in my applet (to eliminate self-induced errors) without success, I tried running the WWJ Applet Demo and it is also throwing an error that appears to be related insofar as both are initialization errors.

Applet.init
subapplet.classname = applet.WWJApplet
subapplet.displayname = WWJ Applet
Applet.start
java.lang.NoClassDefFoundError: Could not initialize class gov.nasa.worldwind.WorldWind
at gov.nasa.worldwind.awt.WorldWindowGLCanv as.<init>(Unknown Source)
at applet.WWJApplet.init(Unknown Source)
at org.jdesktop.applet.util.JNLPAppletLaunc her.startSubApplet(JNLPAppletLauncher.ja va:1889)
at org.jdesktop.applet.util.JNLPAppletLaunc her.access$200(JNLPAppletLauncher.java:6 50)
at org.jdesktop.applet.util.JNLPAppletLaunc her$5.run(JNLPAppletLauncher.java:1261)
at java.awt.event.InvocationEvent.dispatch( InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQ ueue.java:597)
at java.awt.EventDispatchThread.pumpOneEven tForFilters(EventDispatchThread.java:273 )
at java.awt.EventDispatchThread.pumpEventsF orFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsF orHierarchy(EventDispatchThread.java:173 )
at java.awt.EventDispatchThread.pumpEvents( EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents( EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDi spatchThread.java:121)


Has anyone else tried running the 0.3.0 applet? It would be nice to confirm.

Is there anything different in how I should be installing this version that might account for the error? (e.g. do I need to configure my web server in a particular manner which the 0.2.0 version did not require?)

Thanks much!

patmurris
10-15-2007, 12:54 AM
AFAIK applets are no different in 0.3 then in previous code updates 0.2.x.
There has been a couple threads about applets. Did you check them ?

rogene
10-15-2007, 05:44 PM
Nothing like this reported.

amnesic
10-15-2007, 07:12 PM
Has anyone else tried running the 0.3.0 applet? It would be nice to confirm.


Yes I updated our applet to the 0.3 revision without trouble. The only think that I modified was just the value path : gov.nasa.worldwind.examples.applet.WWJAp plet

rogene
10-15-2007, 08:55 PM
Thanks very much for checking.

Well, what can I say? I archived the old versions of WWJ and then I copied the v.0.3.0 index_applet.html and worldwind.jar files to my webserver dir (/var/www/html).

The only modification I made was to the file index_applet.html where I replace applet-launcher.jar with http://download.java.net/media/applet-launcher/applet-launcher.jar as you can see in the following code:

<applet id="wwjApplet" name="wwjApplet" mayscript code="org.jdesktop.applet.util.JNLPAppletLaunc her" width=100% height=70%
archive="http://download.java.net/media/applet-launcher/applet-launcher.jar,http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jar, http://download.java.net/media/gluegen/webstart/gluegen-rt.jar, worldwind.jar">
<param name="codebase_lookup" value="false">
<param name="subapplet.classname" value="gov.nasa.worldwind.examples.applet.WWJAp plet">
<param name="subapplet.displayname" value="WWJ Applet">
<param name="noddraw.check" value="true">
<param name="progressbar" value="true">
<param name="jnlpNumExtensions" value="1">
<param name="jnlpExtension1" value="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp">
</applet>


I cleared out my cache (as well as .jnlp dirs).
I stayed on linux where I would not be dealing with any Vista surprises.
I reversed the change I made above and it did not matter.

rogene
10-15-2007, 10:35 PM
It appears that there has been a change in jarsigning policy between versions 0.2.0 and 0.3.0.

Back in 0.2.0, the worldwind.jar was signed by NASA, not me. Now, it appears that the deployment site must sign the ww jar in addition to the jar that contains one's own application in order for the applet to run.


[root@localhost]# jarsigner -verify worldwind.0.2.0.jar
jar verified.
[root@localhost]# jarsigner -verify worldwind.0.3.0.jar
jar is unsigned. (signatures missing or not parsable)


Mystery solved.

patmurris
10-15-2007, 11:09 PM
Thats odd. Worldwind.jar was supposed to be signed i beleive.

tag
10-16-2007, 12:38 AM
Applets or JWS apps that wish to use the as-shipped worldwind.jar can draw it from the location specified in the JavaWebStartTemplate.jnlp file:
<extension name="worldwind" href="http://worldwind.arc.nasa.gov/java/0.3.0/webstart/worldwind.jnlp"/>
The worldwind.jar there is signed.

Since worldwind.jar can be (and is expected to be) built locally, it seems more a problem to sign it than to not. Any rebuild will eliminate the signed version, and cause people to wonder why their applet worked before and not now. The applet builder can always sign it.

We're open to doing this differently, but I want to be sure it's necessary.