JDK-6771026 : Plugin2 crashes on applets in XHTML/XML files
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: linux,windows_vista
  • CPU: x86
  • Submitted: 2008-11-13
  • Updated: 2013-01-10
  • Resolved: 2009-01-21
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
6u12 b02Fixed
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
1.6.0_10

ADDITIONAL OS VERSION INFORMATION :
Linux, Windows XP, Windows Vista
(seems to be independant of OS version because almost all of our students reported this issue)

EXTRA RELEVANT SYSTEM CONFIGURATION :
Firefox 3 (tested version 3.0.3)

A DESCRIPTION OF THE PROBLEM :
The Java Plugin crashes when opening a XHTML file containing an arbitrary applet in the Firefox browser if and only if the file has a "xml" ending.
This problem does not occur if the same file has either the ending "html" or "xhtml".


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create an empty applet (i.e. an empty class extending "JApplet") and reference it in a XHTML file with the file ending "xml". The applet may be bundled in a JAR file.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The applet should start as it does for XHTML files with ending "html" or "xhtml" or with "xml" files in "old" 1.6 plugin.
ACTUAL -
The plugin terminates immediately when opening a "xml" file. Also the Java console closes, the tray icon disappears and log-files are unlocked. Applet certificates will reappear when opening other applets in non-"xml" files.
There are only empty log messages even if all debugging options are turned on (see error message).

ERROR MESSAGES/STACK TRACES THAT OCCUR :
<?xml version="1.0" encoding="windows-1252" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
</log>

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
Contents of XHTML file:
------------------------------------------
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
  <applet code="MyApplet" codebase="." archive="applet.jar" width="100" height="100"/>
</body>
</html>

Contents of arbitrary applet:
------------------------------------------------
import javax.swing.JApplet;
public class MyApplet extends JApplet { }

Note: this test case is available online with reference tests and source code:
http://www.math.tu-berlin.de/~gronau/applet_xhtml_test/tests.html
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Don't use XHTML documents with file ending "xml" for applets in new Java Plugin or use one of the older plugins instead (every version before Java 6 Update 10 works fine).

Comments
EVALUATION We query mozilla document.URL in the DOM to get document base. This does not work for this XHTML/XML files. Try to query document.documentURI, we can get the right document base. As a matter of fact, use FF3 Dom inspector addon to inspect the page, there is no document.URL property. It might be a FF bug.
14-11-2008