Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4467796

WindowsPreferences class throws an exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.0
    • core-libs
    • x86
    • windows_2000



      Name: yyT116575 Date: 06/08/2001


      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

      When executing the method show() of a java.util.Frame or javax.swing.JFrame,
      the exception described below is thrown. The test case souce code is in the
      attached file.

        From the stack indications and after having a look in the WindowsPreferences
      class, I have found that, due to the non-accessibility of the windows registry
      in my case, a log would be performed. Unfortunately, the logger is not yet
      initialized and have the value null!


      java.lang.ExceptionInInitializerError
      at java.util.prefs.WindowsPreferencesFactory.userRoot
      (../../../src/win32/classes/java/util/prefs/WindowsPreferencesFactory.java:28)
      at java.util.prefs.Preferences.userRoot(Preferences.java:338)
      at sun.awt.im.ExecutableInputMethodManager$2.run
      (InputMethodManager.java:785)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.awt.im.ExecutableInputMethodManager.getUserRoot
      (InputMethodManager.java:783)
      at sun.awt.im.ExecutableInputMethodManager.<init>
      (InputMethodManager.java:277)
      at sun.awt.im.InputMethodManager.getInstance
      (InputMethodManager.java:141)
      at sun.awt.windows.WFramePeer.<init>(WFramePeer.java:151)
      at sun.awt.windows.WToolkit.createFrame(WToolkit.java:306)
      at java.awt.Frame.addNotify(Frame.java:457)
      at java.awt.Window.show(Window.java:427)
      at java.awt.Component.show(Component.java:1110)
      at java.awt.Component.setVisible(Component.java:1067)
      at mep.TestAwt.<init>(TestAwt.java:35)
      at mep.TestAwt.main(TestAwt.java:45)
      Caused by: java.lang.NullPointerException
      at java.util.prefs.WindowsPreferences.<init>
      (../../../src/win32/classes/java/util/prefs/WindowsPreferences.java:436)
      at java.util.prefs.WindowsPreferences.<clinit>
      (../../../src/win32/classes/java/util/prefs/WindowsPreferences.java:72)
      ... 15 more
      Exception in thread "main"


      (Review ID: 125971)
      ======================================================================

            kkladkosunw Konstantin Kladko (Inactive)
            yyoungsunw Yung-ching Young (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: