JDK-6857870 : Regression tests are failing with ExceptionInInitializerError
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS:
    generic,windows,windows_xp,windows_vista generic,windows,windows_xp,windows_vista
  • CPU: generic,x86
  • Submitted: 2009-07-07
  • Updated: 2012-03-22
  • Resolved: 2011-03-07
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 7
7 b66Fixed
Related Reports
Duplicate :  
Duplicate :  
Description
Bug Info
=========

The following regression tests are failing with ExceptionInInitializerError while running with jdk7-b64 pit.

closed/javax/swing/JFileChooser/6215611/bug6215611.java
closed/javax/swing/JFileChooser/6484091/bug6484091.java
closed/javax/swing/JFileChooser/5059770/bug5059770.java
javax/swing/JFileChooser/6688203/bug6688203.java
closed/javax/swing/JPopupMenu/4966112/bug4966112.java
closed/javax/swing/tree/DefaultTreeCellRenderer/6225504/bug6225504.java
javax/swing/border/Test4856008.java
closed/javax/swing/JEditorPane/5076514/bug5076514.java
closed/javax/swing/JFileChooser/4966171/bug4966171.java
closed/javax/swing/JFileChooser/5040999/bug5040999.java
closed/javax/swing/JFileChooser/4776197/bug4776197.java
closed/javax/swing/LookAndFeel/LAFExtending/LAFExtending.java
closed/javax/swing/JFileChooser/4163841/AcceptAllFileFilterTest.java
closed/javax/swing/JFileChooser/4213330/FileChooserSizeTest.java
closed/javax/swing/LookAndFeel/InstallProperty.java

All the above tests are failing in window platform and closed/javax/swing/JEditorPane/5076514/bug5076514.java test fails even on linux and solaris platforms with same exception.


JDK Info
=========
java version "1.7.0-internal"
Java(TM) SE Runtime Environment (build 1.7.0-internal-administrator_2009_07_01_0
0_43-b00)
Java HotSpot(TM) Client VM (build 16.0-b04, mixed mode)

Execption details
=================
java.lang.ExceptionInInitializerError
	at javax.swing.JComponent.repaint(JComponent.java:4780)
	at java.awt.Component.repaint(Component.java:3072)
	at javax.swing.text.JTextComponent.setEditable(JTextComponent.java:1810)
	at javax.swing.text.JTextComponent.<init>(JTextComponent.java:322)
	at javax.swing.JEditorPane.<init>(JEditorPane.java:197)
	at bug5076514.main(bug5076514.java:15)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:623)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:717)
Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.awt")
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:345)
	at java.security.AccessController.checkPermission(AccessController.java:555)
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
	at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1529)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:304)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:331)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:83)
	at javax.swing.RepaintManager.<clinit>(RepaintManager.java:201)

Comments
EVALUATION The bug 6859935 is fixed in b66 - All Settings are in place in JCP/Advanced tab on windows.
24-07-2009

SUGGESTED FIX http://sa.sfbay.sun.com/projects/awt_data/7/6859935/
23-07-2009

EVALUATION It's a duplicate of 6859935.
21-07-2009

EVALUATION The ShellFolder class contains the next code: String managerClassName = (String)Toolkit.getDefaultToolkit().getDesktopProperty("Shell.shellFolderManager"); At the same time WToolkit puts not a string: desktopProperties.put("Shell.shellFolderManager", Class.forName("sun.awt.shell.Win32ShellFolderManager2")); As the result we catch ClassCastException in static initialization of the ShellFolder class. I described the reason of failure of the closed/javax/swing/JFileChooser/6215611/bug6215611.java test. I think other tests contain the same problem. I'm reassigning the bug to Dmitry because this problem was introduced by him.
21-07-2009

EVALUATION It looks like the testing environment doesn't have permissions to access classes in sun.* packages
08-07-2009