-
Bug
-
Resolution: Fixed
-
P2
-
5.0
-
tiger
-
x86, sparc
-
solaris_2.6, solaris_8, windows_2000
-
Verified
Name: acR10002 Date: 08/09/2003
Filed By : SPB JCK team (###@###.###)
JDK : java full version "1.5.0-beta-b13"
JCK : 1.5
Platform[s] : Solaris
switch/Mode : -Djava.awt.headless=true
JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
Failing Test [s] :
api/java_awt/CardLayout/index.html#AddLayoutComponent
api/java_awt/CardLayout/index.html#First
api/java_awt/CardLayout/index.html#InvalidateLayout
api/java_awt/CardLayout/index.html#Last
api/java_awt/CardLayout/index.html#LayoutContainer
api/java_awt/CardLayout/index.html#Next
api/java_awt/CardLayout/index.html#Previous
api/java_awt/CardLayout/index.html#RemoveLayoutComp
api/java_awt/CardLayout/index.html#Show
api/java_awt/Component/AccessibleAWTComponent/index.html#AccessibleComponent
api/java_awt/Component/InputMethodsTests.html#enableInputMethodsTests
api/java_awt/Component/InputMethodsTests.html#processInputMethodEvent
api/java_awt/Event/InputMethodEvent/descriptions.html#InputMethodEventOtherTests2
api/java_awt/EventQueue/index.html#PostGetPeekEvent
api/java_awt/FlowLayout/index.html#MinimumLayoutSize
api/java_awt/FlowLayout/index.html#PreferredLayoutSize
api/java_awt/KeyboardFocusManager/index.html#GetXXXListeners
api/java_awt/KeyboardFocusManager/index.html#CCC_4467840
api/java_awt/Toolkit/index.html#Listener
api/java_beans/DefaultPersistenceDelegate/index.html#Methods
api/javax_swing/JCheckBox/index.html#misc
api/javax_swing/CellRendererPane/descriptions.html#xxxAccessibleXXX
api/javax_swing/AbstractButton/AccessibleAbstractButton/index.html#AccessibleContext
api/javax_swing/ButtonGroup/descriptions.html#xxxSelected
api/javax_swing/AbstractButton/descriptions.html#news
api/javax_swing/AbstractButton/descriptions.html#setgetXXX
api/javax_swing/Box/AccessibleBox/index.html#AccessibleComponent
api/javax_swing/Box/AccessibleBox/index.html#AccessibleContext
api/javax_swing/Box/Filler/AccessibleBoxFiller/index.html#AccessibleComponent
api/javax_swing/Box/Filler/AccessibleBoxFiller/index.html#AccessibleContext
... and many more (total 576 JCK test failures)
Specification excerpt:
======================
--------- J2SE API spec v.1.5 ---------
...
In class DefaultKeyboardFocusManager :
public DefaultKeyboardFocusManager()
(no javadoc comment)
...
In class KeyboardFocusManager :
public static KeyboardFocusManager getCurrentKeyboardFocusManager()
Returns the current KeyboardFocusManager instance for the calling thread's context.
Returns:
this thread's context's KeyboardFocusManager
...
---------- end-of-excerpt ---------------
Problem description
===================
Since JDK1.5.0 b13 DefaultKeyboardFocusManager can no longer be constructed
in headless mode. This seems to be the cause of the fact that many swing lightweight components like JMenu, Jlist, JTable e.t.c. can no longer be
instantiated in headless mode, resulting in the HeadlessException, though
this shouldn't be the case.
Please note, everything was working fine with b12.
Minimized test:
===============
------- Test.java -------
import java.awt.*;
public class Test {
public static void main(String args[]) {
KeyboardFocusManager kfm = new DefaultKeyboardFocusManager();
System.out.println("OK");
}
}
------- end-of-Test.java -------
Minimized test output:
======================
->/set/jdk-builds/JDK1.5.0b13/solaris-sparc/bin/java -Djava.awt.headless=true Test
Exception in thread "main" java.awt.HeadlessException
at sun.awt.HeadlessToolkit.createKeyboardFocusManagerPeer(HeadlessToolkit.java:165)
at java.awt.KeyboardFocusManager.initPeer(KeyboardFocusManager.java:374)
at java.awt.KeyboardFocusManager.<init>(KeyboardFocusManager.java:370)
at java.awt.DefaultKeyboardFocusManager.<init>(DefaultKeyboardFocusManager.java:38)
at Test.main(Test.java:6)
->/set/jdk-builds/JDK1.5.0b12/solaris-sparc/bin/java -Djava.awt.headless=true Test
OK
JCK test source location:
==========================
/java/re/jck/1.5/promoted/latest/JCK-runtime-15/tests
JCK Test output:
=============
java.awt.HeadlessException
at sun.awt.HeadlessToolkit.createKeyboardFocusManagerPeer(HeadlessToolkit.java:165)
at java.awt.KeyboardFocusManager.initPeer(KeyboardFocusManager.java:374)
at java.awt.KeyboardFocusManager.<init>(KeyboardFocusManager.java:370)
at java.awt.DefaultKeyboardFocusManager.<init>(DefaultKeyboardFocusManager.java:38)
at java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager(KeyboardFocusManager.java:154)
at java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager(KeyboardFocusManager.java:145)
at java.awt.Component.getFocusTraversalKeys_NoIDCheck(Component.java:6058)
at java.awt.Component.setFocusTraversalKeys_NoIDCheck(Component.java:6028)
at java.awt.Container.setFocusTraversalKeys(Container.java:2610)
at javax.swing.JTable.<init>(JTable.java:385)
at javax.swing.JTable.<init>(JTable.java:347)
at javax.swing.JTable.<init>(JTable.java:424)
at javasoft.sqe.tests.api.javax.swing.JTable.CtorTests.JTable0001(CtorTests.java:205)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:399)
at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
at com.sun.jck.lib.ExecJCKTestSameJVMCmd$Version2Test.execute(ExecJCKTestSameJVMCmd.java:372)
at com.sun.jck.lib.ExecJCKTestSameJVMCmd$StandardTest.run(ExecJCKTestSameJVMCmd.java:317)
at com.sun.jck.lib.ExecJCKTestSameJVMCmd.execute(ExecJCKTestSameJVMCmd.java:194)
at com.sun.jck.lib.ExecJCKTestSameJVMCmd.run(ExecJCKTestSameJVMCmd.java:125)
at com.sun.javatest.agent.Agent$Task.executeCommand(Agent.java:818)
at com.sun.javatest.agent.Agent$Task.execute(Agent.java:749)
at com.sun.javatest.agent.Agent$Task.handleRequest(Agent.java:610)
at com.sun.javatest.agent.Agent.handleRequestsUntilClosed(Agent.java:379)
at com.sun.javatest.agent.Agent.access$000(Agent.java:43)
at com.sun.javatest.agent.Agent$1.run(Agent.java:255)
at java.lang.Thread.run(Thread.java:549)
Specific Machine Info:
=====================
SunOS mars 5.9 Beta_Refresh sun4u sparc SUNW,Ultra-60
======================================================================
- duplicates
-
JDK-4906543 PIT: Headless BAT Failing for PIT Build 11-Aug-2003.
-
- Closed
-