JDK-6812285 : PIT : WARNING: Exception on Toolkit thread java.lang.UnsatisfiedLinkError: sun.awt.X11.XlibW
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6u14
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2009-03-03
  • Updated: 2011-01-19
  • Resolved: 2009-05-15
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 6 JDK 7
6u14 b03Fixed 7Resolved
Related Reports
Relates :  
Description
I have a frame to which  i have added a button. The whole process i am doing in toolkit thread  as follows
 Toolkit.getDefaultToolkit().getSystemEventQueue().invokeAndWait(new Runnable() {
	public void run() {
		// create a frame & adding the button to it.
	}
}

When the frame is visible , i press on the button. I see the following warning.  
WARNING: Exception on Toolkit thread
java.lang.UnsatisfiedLinkError: sun.awt.X11.XlibWrapper.XLookupStringShort(J)I
	at sun.awt.X11.XlibWrapper.XLookupStringShort(Native Method)
	at sun.awt.X11.XWindow.handleKeyPress(XWindow.java:1048)
	at sun.awt.X11.XWindow.handleKeyPress(XWindow.java:1008)
	at sun.awt.X11.XFocusProxyWindow.handleKeyPress(XFocusProxyWindow.java:66)
	at sun.awt.X11.XBaseWindow.dispatchEvent(XBaseWindow.java:1112)
	at sun.awt.X11.XFocusProxyWindow.dispatchEvent(XFocusProxyWindow.java:58)
	at sun.awt.X11.XBaseWindow.dispatchToWindow(XBaseWindow.java:1079)
	at sun.awt.X11.XToolkit.dispatchEvent(XToolkit.java:475)
	at sun.awt.X11.XToolkit.run(XToolkit.java:588)
	at sun.awt.X11.XToolkit.run(XToolkit.java:523)
	at java.lang.Thread.run(Thread.java:619)

=====================================================================================

This is reproduced only in this pit build ( 6u14 b03 pit build).   And it is reproduced only on solaris & linux. 



Testcase
-------
import java.awt.*;

public class LinkerWarningBug {
	public Frame frame=null;
	public Button b = null;

	LinkerWarningBug( ) {
		 try {
			Toolkit.getDefaultToolkit().getSystemEventQueue().invokeAndWait(new Runnable() {
				public void run() {
					frame = new Frame();
					frame.setLayout(new FlowLayout());
					frame.add(b = new Button("Press me"));
					b.addActionListener(new java.awt.event.ActionListener(){
						public void actionPerformed(java.awt.event.ActionEvent ae){
							System.out.println("You have pressed the button..!");
						}
					});
					frame.setSize(300,300);
					frame.setVisible(true);
				}
			});
		        } catch (Exception e) {
		            e.printStackTrace();
		            System.exit(1);
        }
	}

	public static void main(String []args){
		new LinkerWarningBug();
	}
}

Comments
EVALUATION I've not put back the make/sun/xawt/mapfile-vers file, it seems.
03-03-2009