United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-8000291 cached applet jar files lead to incorrect requests from web server
JDK-8000291 : cached applet jar files lead to incorrect requests from web server

Details
Type:
Backport
Submit Date:
2012-10-01
Status:
Closed
Updated Date:
2012-11-19
Project Name:
JDK
Resolved Date:
2012-10-02
Component:
deploy
OS:
Sub-Component:
plugin
CPU:
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
7u10 (b12)

Related Reports
Backport:

Sub Tasks

Description
FULL PRODUCT VERSION :
1.7.0_06
1.7.0_07

ADDITIONAL OS VERSION INFORMATION :
Windows Vista
Windows 7
Windows 8

A DESCRIPTION OF THE PROBLEM :
If there is a cached version of a requested jar file for an applet, the java plugin makes a request to the web server for a jar.pack.gz file, which will not exist in most cases. If the web server does not respond Status-not-found but Status-multiple-choices, the plugin does not start the java applet at all.

REGRESSION.  Last worked in version 6u31

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :

Please consider the following java applet for example:

http://www.schulphysik.de/java/physlet/applets/truckrace.html

If one loads the java applet for the first time, everything works fine.
And this is the network recording:

HTTP:Request, GET /java/physlet/classes/Animator4_.jar
HTTP:Response, HTTP/1.1, Status: Ok

Now, the jar file is in the cache.

Now, close the browser and try to open it again.
Now, the applet does not start.

This is the network recording:

GET /java/physlet/classes/Animator4_.jar.pack.gz
HTTP:Response, HTTP/1.1, Status: Multiple choices

For some reason, the plugin now tries to request a jar.pack.gz file, which does not exist, instead of the jar file. Now, if the web server is configered not to respond with a Status-not-found but with a Status-multiple-choices, then the java plugin does neither load the correct jar file nor uses the cached version.
If, however, the webserver would respond with a Status-not-found then the plugin uses the cached jar file.


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
If there is a cached version of a jar file, the java plugin should make a correct request to the web server to check if it is outdated. The java plugin should not change "example.jar" to "example.jar.pack.gz". Or if this is a standard behaviour, the plugin should handle Status-multiple-choices replies correctly.
ACTUAL -
The java plugin makes a request for "example.jar.pack.gz" instead of "example.jar" and does not handle the web server response "Status-multiple-choices" correctly.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
* SecurityException: Illegal URL redirect
* ClassFormatError: Incompatible magic value 1008813135 in class...  (this is the beginning of the multiple-choice response <!DO ...)
* ClassNotFoundException: ...

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
http://www.schulphysik.de/java/physlet/applets/truckrace.html
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
If you clear the java cache, then the applet will start correctly for one time. (The next time the applet is in the cache again, ...)

                                    

Comments
Verification: verified with test applet http://www.schulphysik.de/java/physlet/applets/truckrace.html
  7u9 b04   - FAIL, first run OK, second run fails with SecurityException: illegal URL redirection
  7u10 b13 - PASS, first and next runs OK
                                     
2012-10-26



Hardware and Software, Engineered to Work Together