JDK-4772481 : PIT: "Warning: Cannot convert string" displays with awt/swing on RedHatLinux7.3
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: linux
  • CPU: x86
  • Submitted: 2002-11-01
  • Updated: 2003-05-26
  • Resolved: 2002-11-01
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
"Warning: Cannot convert string" displays when invoke java awt/swing program. 


Environment:
J2SDK version:
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-internal-javai18n_30_oct_2002_11_25)

Bundles location: /net/jano.sfbay/export/disk12/i18n/ws/jdk1.4.2-PIT/bundles

Red Hat Linux release 7.3 
Kernel version : 2.4.18-10
XFree86 version: 4.2.0 (Red Hat Linux release: 4.2.0-8) 
glibc version  : 2.2.5-40.


XF86Config:
InputDevice section of XF86Config is for Japanese setting
>Section "InputDevice"
>        Identifier  "Keyboard0"
>        Driver      "keyboard"
>        Option      "XkbLayout" "jp"
>        Option      "XkbModel"  "jp106"


Keyboard: ja106 Japanese keyboard.


Reproduce step to:
Install j2sdk-1_4_2-linux-i586.tar, and then execute Notepad demo
youcan see the Warnings as follows.

[kichi@mervyns /export/linux/j2sdk1.4.2/demo/jfc/Notepad]$ java Notepad
Warning: Cannot convert string "<Key>Escape,_Key_Cancel" to type VirtualBinding
Warning: Cannot convert string "<Key>Home,_Key_Begin" to type VirtualBinding
Warning: Cannot convert string "<Key>F1,_Key_Help" to type VirtualBinding
Warning: Cannot convert string "Shift<Key>F10,_Key_Menu" to type VirtualBinding
Warning: Cannot convert string "<Key>F10,Shift_Key_Menu" to type VirtualBinding
Warning: Cannot convert string "<Key>KP_Enter,_Key_Execute" to type VirtualBinding
Warning: Cannot convert string "Alt<Key>Return,Alt_Key_KP_Enter" to type VirtualBinding


This warning displays only on RHL7.3 with 1.4.2-internal build that for
PIT as listed location path above.
But this warning does not display with 1.4.2-beta-b04 on RHL7.3.
and it does not display on Redhat7.2(32bit). 

It was seen on ja and C locale.





Comments
EVALUATION This is a configuration problem common to users of X/motif systems (not specific to Java apps). A lot of people have seen them with Adobe Acrobat, XEmacs, etc. Note: a lot of FAQs suggest that you ignore these warnings. Most people don't see any ill effects, they just find them annoying. Apparently, the first motif app to run installs _MOTIF_DEFAULT_BINDINGS, probably so that the user can change the virtual keybindings across all Motif apps at once. Solution: edit your $HOME/.motifbind file, and add the keysyms that are not in your XKeysymDB file (possibly at /usr/lib/X11/XKeysymDB, or at /usr/openwin/lib/X11/XKeysymDB). I believe the XKeysymDB file contains mappings for vendor-specific keys. Example: osfDelete : <Key>Delete \n\ osfInsert : <Key>Insert Note that the last entry should not be followed by a \n\ Perhaps Cannot convert string "<Key>Escape,_Key_Cancel" to type VirtualBinding could be cured with osfCancel : <Key>Escape More info: the VirtualBinding warnings above are probably caused by a bug in motif: 4317815. The fix went into solaris patch 107081-30 (sparc) and 107082-30 (x86). I don't know how this will be addressed for Linux, since I'm not entirely sure how motif is distributed for Linux. The best solution would probably be to remove our dependence on motif. ###@###.### 2002-11-01
01-11-2002