JDK-6999415 : Client JDK-7: Liveconnect(Java > JS) is broken with latest bundles
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-11-11
  • Updated: 2011-05-18
  • Resolved: 2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b121Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Liveonnect is broken with latest JDK-7 client bundles
Steps to reproduce:
1) Install JRE bundles from following location
http://rehudson.sfbay.sun.com:8080/hudson/view/Client/view/7-client%20Deploy/job/7-client-deploy-2-product-windows-i586/ws/7client-lastSuccessful/build/windows-i586/bundles/
2) try to load any of the following applets inside the browser
http://sqeweb.sfbay.sun.com/deployment2/jitu/plug-bug/ojiliveconnect/src/HashTableTest.html
http://sqeweb.sfbay.sun.com/deployment2/jitu/plug-bug/ojiliveconnect/src/RoundTripSetElem.html
http://sqeweb.sfbay.sun.com/deployment2/jitu/plugInTestsNoHarness/Liveconnect/html/direct/DirectTest.html
If following exception is getting thrown then bug is reproduced
java.lang.NullPointerException
	at sqe.test.HashTableTest.start(HashTableTest.java:85)
	at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.start(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
java.lang.RuntimeException: java.lang.NullPointerException
	at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.start(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
	at sqe.test.HashTableTest.start(HashTableTest.java:100)
	... 3 more
Exception: java.lang.RuntimeException: java.lang.NullPointe

Comments
EVALUATION Regression introduces with CR6996627 pushback, where AppletContextImpl is moved into AWTAppletAdapter and no longer implements JSContext, which breaks te assumption that Applet.getAppletContext() method will return a JSObject instance we implemented in JSObject.java::getWindow() method. We should implement a better approach to retrieve the JSContext associated with an applet, and we should not assume that applet will be always executed in an environment support JSObject. JSObject is supported under with browser plugins, but not necessary other type of applet host such as AppletViewer.
16-11-2010