IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Java locale "set to CX" problem
I've got a particularly vexing problem afflicting me currently. Whenever I try to start a Java-GUI-based program (such as NetBeans or DB Visualiser), I get a locale error telling me that my current locale is set to CX, and that the programs can't run under this configuration.

A bit of background...I have Sun's Java 1.4.2_07 installed on my Ubuntu Linux box. This was all working *just fine* on Friday. I did a couple minor upgrades to my system this morning, as is normal. As far as I know, nothing I updated should have touched my locales. Indeed, I can't even find a "CX" locale on my system.

Some more information:
[mike@oftheother ~]$ locale\nLANG=en_US\nLC_CTYPE="en_US"\nLC_NUMERIC="en_US"\nLC_TIME="en_US"\nLC_COLLATE="en_US"\nLC_MONETARY="en_US"\nLC_MESSAGES="en_US"\nLC_PAPER="en_US"\nLC_NAME="en_US"\nLC_ADDRESS="en_US"\nLC_TELEPHONE="en_US"\nLC_MEASUREMENT="en_US"\nLC_IDENTIFICATION="en_US"\nLC_ALL=\n[mike@oftheother ~]$ cat /etc/locale.gen\nen_US ISO-8859-1\n\nen_US.UTF-8 UTF-8\n\n#en_AU.UTF-8 UTF-8\n#en_BW.UTF-8 UTF-8\n#en_CA.UTF-8 UTF-8\n#en_DK.UTF-8 UTF-8\n#en_GB.UTF-8 UTF-8\n#en_HK.UTF-8 UTF-8\n#en_IE.UTF-8 UTF-8\n#en_IN UTF-8\n#en_NZ.UTF-8 UTF-8\n#en_PH.UTF-8 UTF-8\n#en_SG.UTF-8 UTF-8\n#en_ZA.UTF-8 UTF-8\n#en_ZW.UTF-8 UTF-8\n
And now, for the technically inclined, some strace output...
\n--- SIGCHLD (Child exited) @ 0 (0) ---\nwaitpid(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], WNOHANG) = 9353\nwaitpid(-1, 0xbfffc7ec, WNOHANG)        = -1 ECHILD (No child processes)\nsigreturn()                             = ? (mask now [])\nrt_sigaction(SIGCHLD, {0x8078e35, [], 0}, {0x8078e35, [], 0}, 8) = 0\nclose(4)                                = 0\nread(3, "0\\n", 128)                     = 2\nread(3, "", 128)                        = 0\nclose(3)                                = 0\nrt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0\nrt_sigaction(SIGINT, {0x8077b24, [], 0}, {SIG_DFL}, 8) = 0\nrt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0\nrt_sigaction(SIGINT, {SIG_DFL}, {0x8077b24, [], 0}, 8) = 0\nrt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0\nrt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0\nrt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0\nrt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0\nrt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0\nread(255, "\\n\\"$app_java_home/bin/java\\" -Dins"..., 6166) = 434\nrt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0\nbrk(0x81a6000)                          = 0x81a6000\nrt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0\n_llseek(255, -10, [6156], SEEK_CUR)     = 0\nclone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7e6e708) = 9354\nrt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0\nrt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0\nrt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0\nrt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0\nrt_sigaction(SIGINT, {0x8077b24, [], 0}, {SIG_DFL}, 8) = 0\nwaitpid(-1, current locale is not supported in X11, locale is set to CX locale modifiers are not supported, using defaultjava.lang.InternalError: Current locale is not supported\n        at sun.awt.motif.MWindowPeer.pSetTitle(Native Method)\n        at sun.awt.motif.MWindowPeer.init(MWindowPeer.java:97)\n        at sun.awt.motif.MFramePeer.<init>(MFramePeer.java:58)\n        at sun.awt.motif.MToolkit.createFrame(MToolkit.java:209)\n        at java.awt.Frame.addNotify(Frame.java:472)\n        at java.awt.Window.pack(Window.java:433)\n        at se.pureit.swing.util.SplashWindow.setVisible(Unknown Source)\n
Further searching has turned up [link|http://groups-beta.google.com/group/comp.unix.sco.misc/browse_thread/thread/c452e0acc3859c64/984699b54b6d232b?lnk=st&q=CX+locale&rnum=5&hl=en#984699b54b6d232b|this post] which indicates a couple of things. First, it's not related to Ubuntu Linux or Java 1.4.2_07. Other posts I've seen out there referring to this problem also indicate that it's not necessarily restricted to the Sun JVM, either. It's particularly perplexing because nobody ever seems to post a fix for it...
-YendorMike

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759 Historical Review of Pennsylvania
New Removed. Was the same strace.
--
[link|mailto:greg@gregfolkert.net|greg],
[link|http://www.iwethey.org/ed_curry|REMEMBER ED CURRY!] @ iwethey
[image|http://www.danasoft.com/vipersig.jpg||||]
Expand Edited by folkert July 26, 2005, 10:31:23 AM EDT
New Workaround discovered
[link|https://bugzilla.ubuntu.com/show_bug.cgi?id=12954|https://bugzilla.ubu..._bug.cgi?id=12954]

Summary: not a Java issue, but rather an incorrect lookup for locale information in the libx11-6 package.
-YendorMike

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759 Historical Review of Pennsylvania
     Java locale "set to CX" problem - (Yendor) - (2)
         Removed. Was the same strace. -NT - (folkert)
         Workaround discovered - (Yendor)

I used to use rot-13, but I decided I needed something at least twice as strong. So now I use rot-26 to encode all of my transmissions.
60 ms