United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6771026 Plugin2 crashes on applets in XHTML/XML files
JDK-6771026 : Plugin2 crashes on applets in XHTML/XML files

Details
Type:
Bug
Submit Date:
2008-11-13
Status:
Closed
Updated Date:
2013-01-10
Project Name:
JDK
Resolved Date:
2009-01-21
Component:
deploy
OS:
windows_vista,linux
Sub-Component:
plugin
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u12 (b02)

Related Reports
Duplicate:

Sub Tasks

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.
                                     
2008-11-14



Hardware and Software, Engineered to Work Together