Date Created: Wed 23-Jan-2008

Related Document Categories:


    Problem:

    Often when trying to run xwindows applications in your ssh session you may get an error similar to the following:

    > xclock

    Warning: Cannot convert string "-monotype-arial-regular-r-normal--*-140-*-*-p-*-iso8859-15" to type FontStruct
    Exception in thread "main" java.lang.InternalError: java/langNullPointerException
    at sun.awt.motif.MComponentPeer.pSetFont(Native Method)
    at sun.awt.motif.MComponentPeer.setFont(MComponentPeer.java:257)
    at sun.awt.motif.MWindowPeer.init(MWindowPeer.java:111)
    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.pack(Window.java:433)
    at com.netscape.management.client.console.SplashScreen.<init>(Unknown Source)
    at com.netscape.management.client.console.Console.<init>(Unknown Source)
    at com.netscape.management.client.console.Console.main(Unknown Source)

    Similar Error when loading ikeyman.sh

    Warning: Cannot convert string "-monotype-arial-regular-r-normal--*-140-*-*-p-*-iso8859-15" to type FontStruct
    Exception in thread "main" java.lang.InternalError: java/langNullPointerException
    at sun.awt.motif.MComponentPeer.pSetFont(Native Method)
    at sun.awt.motif.MComponentPeer.setFont(MComponentPeer.java:257)
    at sun.awt.motif.MWindowPeer.init(MWindowPeer.java:111)
    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 java.awt.Component.show(Component.java:1133)
    at java.awt.Component.setVisible(Component.java:1088)
    at com.ibm.gsk.ikeyman.awt.LoadMonitor.<init>(LoadMonitor.java:110)
    at com.ibm.gsk.ikeyman.Ikeyman.init(Ikeyman.java:325)
    at com.ibm.gsk.ikeyman.Ikeyman.main(Ikeyman.java:719)

    Solution:

    The problem is LC_CTYPE=en_GB.ISO8859-15, for some reason when added to your users profile i.e. websphere unix user e.g wasadm it causes the xwindows java program to error.

    If you are not able to change the profile, you can use

    unset LC_CTYPE

    This will clear the environment variable.

    ---------------------------- or ----------------------------

    An excerpt from a Solaris websphere unix profile shows where we commented out the LC_CTYPE=en_GB.ISO8859-15 line and found it solved the problem.

    #!/usr/bin/ksh
    #**********************************************************
    # .profile
    #**********************************************************

    #Begin Configuration Settings, these are for locale & character setting e.g currency symbols etc for GB
    TZ=GB
    CMASK=022
    LC_COLLATE=en_GB.ISO8859-15
    #LC_CTYPE=en_GB.ISO8859-15
    LC_MESSAGES=C
    LC_MONETARY=en_GB.ISO8859-15
    LC_NUMERIC=en_GB.ISO8859-15
    LC_TIME=en_GB.ISO8859-15
    export TZ CMASK LC_COLLATE LC_CTYPE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME
    #End Configuration Settings


Middleware Mentor - Steven Charles Robinson

About Me

Steve Robinson has been working in IT for over 15 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware consulting. Steve comes from both an administration and development background.

Before moving to JEE, Steve was an accomplished developer and consultant for both IBM Lotus Notes and Microsoft .NET Technologies.

Follow Steve as @stevencrobinson on twitter.

Read my books?

IBM WebSphere Application Server 8.0 Administration Guide

IBM WebSphere Application Server 8.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Categories

Oracle WebLogic Categories

JBoss Categories

Other Categories