JDK-5049591 : Applets fail to load sometimes throwing java.lang.ClassFormatError
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: generic
  • CPU: generic
  • Submitted: 2004-05-19
  • Updated: 2004-12-01
  • Resolved: 2004-12-01
Related Reports
Relates :  
Description
Tested_Java_Release   	: 1.5.0-beta2-b50/51
Tested_bundles_Location : 
promoted builds: /net/koori.sfbay/p/jdk07/jdk/1.5.0/beta2/b50(51)/bundles
Tested_Machine_Name   	: kirov/jd-sqe-01/paris2
Tested O/S           	: solaris10/win32/linux9

Problem description:
It has bee noticed that sometimes applets fails to load by throwing following exception and on pressing reload it's getting loaded fine 
java.lang.ClassFormatError: Incompatible magic value 281738938 in class file GetResourceTest
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at sun.applet.AppletClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.applet.AppletClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at SecurityTestApplet.init(SecurityTestApplet.java:67)
        at sun.applet.AppletPanel.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

This bug is quite hard to reproduce and it's not consistent but in one around on automated runs with ATF on all the configs I've noticed this problem.

Steps to reproduce
-------------------
1) Install JRE
On unix register browsers with the installed JRE
2) Remove <user_dep_home> directory
on windows C:/Documents and Settings>/<username>/Application Data/Sun
on unix <user_home>/.java
3) Try loading the following URL inside the browser
http://sqeweb.sfbay.sun.com/deployment1/deployment_tiger_exec_ws/deployment/tests/appletattack/pluginhtml-default/appletattack.html

If you notice the above mentioned exception then the bug is reproduced
Press reload applet will load fine
(As mentioned this bug is not consistent when run manually, but with ATF(automated test framework) this is always reproducible.
 With the latest PIT bundles I'm able to reproduce the problem quite consistently manually also. Problem is seen only when the deployment_user_cache is enabled as soon as deployment_user_cache is disabled applet loading works fine)

Automated runs logs:
http://sqeweb.sfbay.sun.com/deployment3/dtf-results/results/tiger_beta2_milestone/b51/Plugin/winXPHome-NS7/logs/report_AppletAttack_log.txt

Comments
EVALUATION This bug would be better address by TL team. But please provide at least testcase information where problem is most likely to occur. ###@###.### 2004-05-22 I'm marking this bug as incomplete; we need a testcase and also need to know how the applet was being loaded. Please see bug 4975146 Applet: java.lang.ClassFormatError: Incompatible magic value which has the same symptoms. This bug was closed as it appeared to be a one-time event due to Mozilla 1.6b. ###@###.### 2004-05-24 ------------------------------------------------
24-05-2004