Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 58707 - "Current locale not supported" in java-32bit while running 64 bit xserver
Summary: "Current locale not supported" in java-32bit while running 64 bit xserver
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on: 86861
Blocks:
  Show dependency tree
 
Reported: 2004-07-28 16:00 UTC by Jan Kuemmel
Modified: 2005-03-28 11:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kuemmel 2004-07-28 16:00:40 UTC
the x lib 32bit-emulation does not work right for sun-java. Whenever I try to open a window in a java program running in a 32 bit JVM on a 64 bit x server, it fails.

Reproducible: Always
Steps to Reproduce:
1. Compile this java program:
import java.awt.Frame;
public class Foo {
  public static void main(String[] args) {
    Frame frame = new Frame("Foo");
    frame.setBounds(100,100,300,300);
    frame.show();
  }
}
2. try to start it with a 32 bit sun jvm on a 64 bit kernel and x server
3. see what happens 

Actual Results:  
No window appears, the JVM exits with the following message:
current locale is not supported in X11, locale is set to CX locale modifiers are
not supported, using defaultException in thread "main" java.lang.InternalError:
Current locale is not supported
        at sun.awt.motif.MWindowPeer.pSetTitle(Native Method)
        at sun.awt.motif.MWindowPeer.init(MWindowPeer.java:97)
        at sun.awt.motif.MFramePeer.<init>(MFramePeer.java:58)
        at sun.awt.motif.MToolkit.createFrame(MToolkit.java:209)
        at java.awt.Frame.addNotify(Frame.java:472)
        at java.awt.Window.show(Window.java:459)
        at Foo.main(Foo.java:6)


Expected Results:  
an empty window should appear as it does on a 32 bit OS.
Comment 1 Jan Kuemmel 2004-11-17 11:33:48 UTC
good news, I found a possible solution!

running a simple swing program in a 32 bit vm, strace showed me the following:
open("/usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)

the file java is looking for exists but at 
/usr/X11R6/lib32/X11/locale/lib/common/xlcDef.so.2

As the only lib directory existing in /usr/X11R6/lib/X11/locale was called lib64, I tried 
ln -s /usr/X11R6/lib32/X11/locale/lib /usr/X11R6/lib/X11/locale/lib
and: 
it worked!
Unforunately, I don't know if this has any implications on 64 bit programs searching for that library or another one in that directory. So far, I didn't notice anything unusual. But I am sure one of you guys or the amd64 team may have a proper solution for this problem, now that the details are known.

I am setting amd64@gentoo.org to cc.
Comment 2 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-12-18 12:07:43 UTC
Please advise.
Comment 3 Jeremy Sonander 2005-02-14 09:06:13 UTC
I have a similar problem. When invoking a java application I get

current locale is not supported in X11, locale is set to CX locale modifiers are not supported, using defaultException in thread "main" java.lang.IllegalStateException: SavablePrefs has not been properly initialized.  Call SavablePrefs.openPrefs( path ) to setup the Properties used for saving prefs.
        at hdac.common.SavablePrefs.getPriorPrefs(SavablePrefs.java:594)
        at hdac.common.SavablePrefs.getPrefsForSaving(SavablePrefs.java:612)
        at hdac.common.SavablePrefs.initInt(SavablePrefs.java:341)
        at hdac.client.ClientPrefs.isBeepsDisabled(ClientPrefs.java:555)
        at hdac.client.ClientOutput.playErrorBeep(ClientOutput.java:489)
        at hdac.client.ClientOutput.displayInternalError(ClientOutput.java:328)
        at hdac.client.ClientOutput.displayInternalError(ClientOutput.java:360)
        at hdac.client.Sol_Client.startup(Sol_Client.java:135)
        at hdac.client.Sol_Client.<init>(Sol_Client.java:90)
        at hdac.client.Sol_Client.main(Sol_Client.java:96)

I dont have a /usr/X11R6/lib32 so tried 
ln -s /usr/X11R6/lib/X11/locale/lib /usr/X11R6/lib/X11/locale/lib

however I still get the same error.
Comment 4 Jan Kuemmel 2005-02-17 02:28:27 UTC
I just upgraded to emul-linux-x86-xlibs-1.2-r6 and xorg-x11-6.8.0-r4.
Now I had the same problem again. For some reason, the new xlib emul package does not include the libraries 32bit java expects in /usr/X11R6/lib32/X11/locale/lib/.
I fixed the problem by 
cp -a /mnt/hda2/usr/X11R6/lib/X11/locale/lib /usr/X11R6/lib32/X11/locale/
(/mnt/hda2 is a 32bit gentoo installation)

Shouldn't the emulation package include those libs?
Comment 5 Alex Howells (RETIRED) gentoo-dev 2005-03-28 11:00:04 UTC
Over a month has passed since last activity. Please be sure to upgrade your system to Gentoo/AMD64 2005.0 and then advise us of the current status. Until that time, since we're having a spring cleaning session, this bug is closed. Don't hesitate to reopen if you feel it should still be resolved, and it still poses a problem under the current profile (2005.0) with fully updated packages.