United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6678349 Regression: speed-trap.com dashboard doesn't load
6678349 : Regression: speed-trap.com dashboard doesn't load

Details
Type:
Bug
Submit Date:
2008-03-21
Status:
Closed
Updated Date:
2010-09-08
Project Name:
JDK
Resolved Date:
2008-04-22
Component:
deploy
OS:
generic
Sub-Component:
plugin
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u10

Related Reports
Relates:
Relates:

Sub Tasks

Description
During regression testing of the fix for 6676489, it was discovered that the speed-trap.com dashboard was broken with the fix for 6668033, in which a level of indirection was added to the JnlpLookupStub to delegate through the current JNLP class loader / JNLPClassLoaderIf. It turns out the speed-trap applet tries to call into the JNLP services and expects either that ClassNotFoundException will be thrown, or that a query to fetch a given service will return null. Throwing SecurityException breaks their applet. Currently the following NullPointerException is thrown, which also breaks their applet:

java.lang.NullPointerException
	at com.sun.jnlp.JnlpLookupStub.findService(JnlpLookupStub.java:45)
	at com.sun.jnlp.JnlpLookupStub.access$000(JnlpLookupStub.java:18)
	at com.sun.jnlp.JnlpLookupStub$1.run(JnlpLookupStub.java:25)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.jnlp.JnlpLookupStub.lookup(JnlpLookupStub.java:22)
	at javax.jnlp.ServiceManager.lookup(ServiceManager.java:42)
	at com.speed_trap.applet.JNLPBridgeImpl.getJNLPCodeBase(Unknown Source)
	at com.speed_trap.data.olap.CodeBaseCategoryResourceProvider.getInstance(Unknown Source)
	at com.speed_trap.dashboard.DataAccessorApplet.<init>(Unknown Source)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at java.lang.Class.newInstance0(Class.java:355)
	at java.lang.Class.newInstance(Class.java:308)
	at sun.plugin2.applet.Plugin2Manager.createApplet(Plugin2Manager.java:2582)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1189)
	at java.lang.Thread.run(Thread.java:619)

We need to fail more gracefully. The best solution appears to be to simply return null from the JnlpLookupStub if there's no current JNLPClassLoaderIf.
Yes, the JNLP lookup shall just return NULL, 
if the service is not available - due to the spec.

                                    

Comments
EVALUATION

Let JNLP lookup return null, 
even though JNLP is not initialized.
                                     
2008-03-21
SUGGESTED FIX

http://sa.sfbay.sun.com/projects/deployment_data/6u10/6678349.0
                                     
2008-03-21
EVALUATION

The speed-trap.com applet attempts to call into the JNLP services and
expects either that ClassNotFoundException will be thrown, or that a
query to fetch a given service will return null. The fix for 6668033,
in which a level of indirection was added to the JnlpLookupStub to
delegate through the current JNLP class loader / JNLPClassLoaderIf,
causes a NullPointerException to be thrown which causes the speed-trap
dashboard to break. Fixed the JnlpLookupStub to fail more gracefully.

Tested manually with the speed-trap.com dashboard in IE. No other test
case feasible at this time due to time constraints.
                                     
2008-03-21



Hardware and Software, Engineered to Work Together