JDK-6521732 : Intermittent class load errors when Java 1.6 methods are called from javascript
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux,solaris,solaris_nevada
  • CPU: x86,sparc
  • Submitted: 2007-02-06
  • Updated: 2011-03-25
  • Resolved: 2007-03-28
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 6 JDK 7
6u2 b01Fixed 7Fixed
Related Reports
Duplicate :  
Description
To reproduce the issue:

   1) unzip the attachment StarOffice.zip to somewhere available to your web browser (on the client filesystem or on a web server)

   2) Install java 1.6.0 b105 or 1.6.0_1, 

   3) Create a link in the mozilla plugin directory to the correct JRE plugin:

ROI-9399901-host-1:/usr/lib/mozilla/plugins # ln -s ../../../java/jre1.66.0/plugin/i386/ns7/libjavaplugin_oji.so .

   4) Set up deployment properties in your home directory to point to the correct JRE ~/.java/deployment/deployment.properties  The attached example deployment properties works for java 1.6 b105 on JDS3 linux.

   5) Install the attached .java.policy file in your user's home directory.  Replace <jre1.6.0>/lib/security/java.policy with the attached java.policy (backup the org one first)

   6) launch soffice (staroffice 8) on your client desktop and make sure it doesn't have any documents pending recovery.  Close staroffice.

   7) Launch mozilla  browser on client desktop.  Browse to the page where the StarOffice.zip file was extracted.  e.g. file:///home/user1/StarOffice/staroffice.html

   8) Hit refresh on the page a number of times. In here it is usually on the 5th refresh that the issue occurs.
    
    The installed PC has JDS3 with JRE 1.6
    The JavaScript error console can be seen to have the errors.

        The developers are calling a function every 100 milliseconds to check if the applet is active and this is not returning a success intermittently.

See also the attached log file before and after refresh triggers the problem.

Comments
EVALUATION This applet intermittently load problem is Java Plugin specific. It's related to mismatch of plugin instance to be destroyed when the applet destroy request (triggered by page refresh) is received too late -- after a new plugin instance has already been created. When that happens, instead of destroying the old plugin instance of the previously loaded applet, the newly created instance is disposed, preventing any LiveConnect or communication between the browser and the applet, and therefore, preventing the JS->J call to load the StarOffice encoded document. This problem is in JPI code all along but the changes from 1.5 to 1.6 (and beyond) probably made the problem surface more easily now than compared to running with 1.5. Fix is understood. Will get fix in to both 7.0 and 6u2.
08-02-2007