JDK-6962357 : JCK api/java_awt/awt_focus_subsystem/keyeventdispatcher_keyeventpostprocessor/ fails since b74 jdk7
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2010-06-18
  • Updated: 2012-03-22
  • Resolved: 2011-02-03
Related Reports
Duplicate :  
Relates :  
Description
Following tests fails since b74 of jdk7 on OEL5.5 using KDE 3.5
api/java_awt/awt_focus_subsystem/keyeventdispatcher_keyeventpostprocessor/index.html#KeyEventDispatcher
api/java_awt/awt_focus_subsystem/keyeventdispatcher_keyeventpostprocessor/index.html#KeyEventPostProcessor

The failure is specific for KDE, on the same machine using Gnome desktop environment tests pass.

Tests fail with NPE, see jtr files attached.
We could also see java.lang.ExceptionInInitializerError in the stack traces. Even though this exception also started to appear somewere around b74 - it is not 100% reproducible and it does *not* make test failed. This exception may appear on any unix machine.

This tests are new in JCK7.
The exception trace looks like this :

----------messages:(1/614)----------
command: com.sun.jck.lib.ExecJCKTestOtherJVMCmd DISPLAY=:0 HOME=/export/home/stt-robot /export/jdk/jdk1.7.0/bin/java -server -Djava.ext.dirs=/export/JCK/JCK-runtime-7/lib/extensions:/export/jdk/jdk1.7.0/lib/ext:/export/jdk/jdk1.7.0/jre/lib/ext -Xfuture -classpath /export/JCK/JCK-runtime-7/classes:/export/jdk/jdk1.7.0/lib/tools.jar -Djava.security.policy=/export/JCK/JCK-runtime-7/lib/jck.policy javasoft.sqe.tests.api.java.awt.awt_focus_subsystem.k_keyeventpostprocessor.KeyEventDispatcherTests -platform.crossWindowFocusTransferSupported true -platform.crossWindowFocusTransferSupported true -timeoutFactor 1.0
----------out1:(217/18317)----------
java.lang.ExceptionInInitializerError
	at sun.font.FontConfigManager.getFontConfigAAHint(FontConfigManager.java:132)
	at sun.font.FontConfigManager.getFontConfigAAHint(FontConfigManager.java:123)
	at sun.awt.X11.XToolkit.initXSettingsIfNeeded(XToolkit.java:1535)
	at sun.awt.X11.XToolkit.lazilyLoadDesktopProperty(XToolkit.java:1501)
	at java.awt.Toolkit.getDesktopProperty(Toolkit.java:1798)
	at sun.swing.SwingUtilities2$AATextInfo.getAATextInfo(SwingUtilities2.java:138)
	at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:1557)
	at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:147)
	at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1592)
	at javax.swing.UIManager.setLookAndFeel(UIManager.java:532)
	at javax.swing.UIManager.setLookAndFeel(UIManager.java:572)
	at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1329)
	at javax.swing.UIManager.initialize(UIManager.java:1418)
	at javax.swing.UIManager.maybeInitialize(UIManager.java:1406)
	at javax.swing.UIManager.getDefaults(UIManager.java:646)
	at javax.swing.JComponent.setUI(JComponent.java:659)
	at sun.awt.X11.XTextFieldPeer$XAWTTextField.updateUI(XTextFieldPeer.java:679)
	at javax.swing.text.JTextComponent.<init>(JTextComponent.java:325)
	at javax.swing.JTextField.<init>(JTextField.java:231)
	at javax.swing.JPasswordField.<init>(JPasswordField.java:138)
	at javax.swing.JPasswordField.<init>(JPasswordField.java:96)
	at sun.awt.X11.XTextFieldPeer$XAWTTextField.<init>(XTextFieldPeer.java:620)
	at sun.awt.X11.XTextFieldPeer.<init>(XTextFieldPeer.java:73)
	at sun.awt.X11.XToolkit.createTextField(XToolkit.java:985)
	at java.awt.TextField.addNotify(TextField.java:222)
	at java.awt.Container.addImpl(Container.java:1102)
	at java.awt.Container.add(Container.java:398)
at javasoft.sqe.tests.api.java.awt.awt_focus_subsystem.k_keyeventpostprocessor.KeyEventDispatcherTests.checkNoDispatcherRegistered(KeyEventDispatcherTests.java:96)
	at javasoft.sqe.tests.api.java.awt.awt_focus_subsystem.k_keyeventpostprocessor.KeyEventDispatcherTests.access$1800(KeyEventDispatcherTests.java:46)
	at javasoft.sqe.tests.api.java.awt.awt_focus_subsystem.k_keyeventpostprocessor.KeyEventDispatcherTests$2.run(KeyEventDispatcherTests.java:617)
	at javasoft.sqe.jck.lib.SecurityTestRunner.runTestWithTCKSM(SecurityTestRunner.java:279)
	at javasoft.sqe.jck.lib.SecurityTestRunner.runTestWithPermissions(SecurityTestRunner.java:235)
	at javasoft.sqe.jck.lib.SecurityTestRunner.runTestWithAllPermissions(SecurityTestRunner.java:157)
	at javasoft.sqe.tests.api.java.awt.awt_focus_subsystem.k_keyeventpostprocessor.KeyEventDispatcherTests.checkCase1(KeyEventDispatcherTests.java:631)
	at javasoft.sqe.tests.api.java.awt.awt_focus_subsystem.k_keyeventpostprocessor.KeyEventDispatcherTests.KeyEventDispatcherTest_hw_0001(KeyEventDispatcherTests.java:743)
	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:613)
	at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:406)
	at javasoft.sqe.jck.lib.api.java.awt.awt_focus_subsystem.SharedFrameTest.invokeTestCase(SharedFrameTest.java:88)
	at javasoft.sqe.jck.lib.api.java.awt.awt_focus_subsystem.AWTFocusTest.invokeTestCase(AWTFocusTest.java:119)
	at javasoft.sqe.jck.lib.api.java.awt.awt_focus_subsystem.FocusTrackingTest.invokeTestCase(FocusTrackingTest.java:52)
	at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
	at javasoft.sqe.jck.lib.api.java.awt.awt_focus_subsystem.SharedFrameTest.run(SharedFrameTest.java:71)
	at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:127)
	at javasoft.sqe.tests.api.java.awt.awt_focus_subsystem.k_keyeventpostprocessor.KeyEventDispatcherTests.main(KeyEventDispatcherTests.java:732)
Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "sun.java2d.debugfonts" "read")
	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.checkPropertyAccess(SecurityManager.java:1302)
	at java.lang.System.getProperty(System.java:700)
	at sun.font.FontUtilities.<clinit>(FontUtilities.java:149)
	... 47 more

Comments
EVALUATION The exception .. java.lang.ExceptionInInitializerError at sun.font.FontConfigManager.getFontConfigAAHint(FontConfigManager.java:132) at sun.font.FontConfigManager.getFontConfigAAHint(FontConfigManager.java:123) happens on the first line of getFontConfigAAHint() at the innocuous looking line "if (FontUtilities.isWindows) {" Looking a long way down the trace we see Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "sun.java2d.debugfonts" "read") 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.checkPropertyAccess(SecurityManager.java:1302) at java.lang.System.getProperty(System.java:700) at sun.font.FontUtilities.<clinit>(FontUtilities.java:149) ... 47 more line 149 of FontUtilities retrieves a system property sun.java2d.debugfonts The b74 fontmanager refactoring lost doPrivileged around a number of getProperty calls in the static initialiser of this class. Some were fixed under 6904882, but in b94 we still had this one at line 149 and that was finally fixed in JDK7 b102 under 6968373 So I am closing this as a dup of that.
03-02-2011

EVALUATION Reproduced with jdk7b100.
19-08-2010

EVALUATION The exception happen from the sun.font.FontConfigManager.getFontConfigAAHint(FontConfigManager.java:132) Perhaps related to 6795908: Refactor FontManager
19-08-2010