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

fail when trying to run any java app or applet under e17

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4
    • None
    • 5.0
    • client-libs
    • x86
    • linux

    Description

      FULL PRODUCT VERSION :
      java version "1.5.0_04"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
      Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)

      and

      java version "1.5.0_04"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
      Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_04-b05, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Linux linux 2.6.12.5 #3 Sat Aug 20 10:27:33 PDT 2005 x86_64 unknown unknown GNU/Linux

      (I reported as a general Linux (not only 64bit) because e17 developers did apply a patch to "emulate" e16 to make jvm work there)

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      tested for applets, java awt apps, java Swing apps and java console apps with server and client configuration

      e17 was compilled as a 64bit app and both modes (64bit and 32bit) jvm were tested

      A DESCRIPTION OF THE PROBLEM :
      when trying to run any java app using JVM 1.4 or 1.5 it fails with the following error:

      Atom was 0
      java.lang.ExceptionInInitializerError
              at org.netbeans.core.NonGui.getUserDir(NonGui.java:118)
              at org.netbeans.core.NonGui.getLogDir(NonGui.java:147)
              at org.netbeans.core.CLIOptions.initialize(CLIOptions.java:192)
              at org.netbeans.core.Main.start(Main.java:304)
              at org.netbeans.core.TopThreadGroup.run(TopThreadGroup.java:90)
              at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.NullPointerException: Failed to retrieve atom name.
              at sun.awt.X11.XlibWrapper.XGetAtomName(Native Method)
              at sun.awt.X11.XAtom.<init>(XAtom.java:219)
              at sun.awt.X11.XAtom.get(XAtom.java:146)
              at sun.awt.X11.XAtom.getAtomListProperty(XAtom.java:630)
              at sun.awt.X11.XAtom.getAtomListPropertyList(XAtom.java:644)
              at sun.awt.X11.XProtocol.checkProtocol(XProtocol.java:37)
              at sun.awt.X11.XNETProtocol.doStateProtocol(XNETProtocol.java:273)
              at sun.awt.X11.XWM.initializeProtocols(XWM.java:1178)
              at sun.awt.X11.XWM.<init>(XWM.java:113)
              at sun.awt.X11.XWM.getWM(XWM.java:559)
              at sun.awt.X11.XWM.init(XWM.java:1169)
              at sun.awt.X11.XToolkit.<init>(XToolkit.java:320)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
              at java.lang.Class.newInstance0(Class.java:350)
              at java.lang.Class.newInstance(Class.java:303)
              at java.awt.Toolkit$2.run(Toolkit.java:833)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
              at javax.swing.UIManager.initialize(UIManager.java:1262)
              at javax.swing.UIManager.maybeInitialize(UIManager.java:1245)
              at javax.swing.UIManager.getDefaults(UIManager.java:556)
              at javax.swing.filechooser.FileSystemView.getFileSystemView(FileSystemView.java:63)
              at org.openide.filesystems.FileUtil.<clinit>(FileUtil.java:49)
              ... 6 more
      Atom was 0

      I have researched at the source code and i find a little silly the way the JVM try to guess what wm is running, because you are not thinking in another window managers; even some bad positioning happen when using kde in two different pc's; i would recommend to see for more general options inside Xserver and have a default generic config for any other wm (in case it is not registered or a nullpointerException is returned (like in this case)

      the window manager should not be relevant when trying to run a Java Console App(some apps of this kind will not run and another ones would run perfectly).


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      just try to run any java app or applet you want under e17 in a Linux amd64 system.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      run the app (any)
      ACTUAL -
      Atom was 0
      java.lang.ExceptionInInitializerError
              at org.netbeans.core.NonGui.getUserDir(NonGui.java:118)
              at org.netbeans.core.NonGui.getLogDir(NonGui.java:147)
              at org.netbeans.core.CLIOptions.initialize(CLIOptions.java:192)
              at org.netbeans.core.Main.start(Main.java:304)
              at org.netbeans.core.TopThreadGroup.run(TopThreadGroup.java:90)
              at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.NullPointerException: Failed to retrieve atom name.
              at sun.awt.X11.XlibWrapper.XGetAtomName(Native Method)
              at sun.awt.X11.XAtom.<init>(XAtom.java:219)
              at sun.awt.X11.XAtom.get(XAtom.java:146)
              at sun.awt.X11.XAtom.getAtomListProperty(XAtom.java:630)
              at sun.awt.X11.XAtom.getAtomListPropertyList(XAtom.java:644)
              at sun.awt.X11.XProtocol.checkProtocol(XProtocol.java:37)
              at sun.awt.X11.XNETProtocol.doStateProtocol(XNETProtocol.java:273)
              at sun.awt.X11.XWM.initializeProtocols(XWM.java:1178)
              at sun.awt.X11.XWM.<init>(XWM.java:113)
              at sun.awt.X11.XWM.getWM(XWM.java:559)
              at sun.awt.X11.XWM.init(XWM.java:1169)
              at sun.awt.X11.XToolkit.<init>(XToolkit.java:320)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
              at java.lang.Class.newInstance0(Class.java:350)
              at java.lang.Class.newInstance(Class.java:303)
              at java.awt.Toolkit$2.run(Toolkit.java:833)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
              at javax.swing.UIManager.initialize(UIManager.java:1262)
              at javax.swing.UIManager.maybeInitialize(UIManager.java:1245)
              at javax.swing.UIManager.getDefaults(UIManager.java:556)
              at javax.swing.filechooser.FileSystemView.getFileSystemView(FileSystemView.java:63)
              at org.openide.filesystems.FileUtil.<clinit>(FileUtil.java:49)
              ... 6 more
      Atom was 0

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Atom was 0
      java.lang.ExceptionInInitializerError
              at org.netbeans.core.NonGui.getUserDir(NonGui.java:118)
              at org.netbeans.core.NonGui.getLogDir(NonGui.java:147)
              at org.netbeans.core.CLIOptions.initialize(CLIOptions.java:192)
              at org.netbeans.core.Main.start(Main.java:304)
              at org.netbeans.core.TopThreadGroup.run(TopThreadGroup.java:90)
              at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.NullPointerException: Failed to retrieve atom name.
              at sun.awt.X11.XlibWrapper.XGetAtomName(Native Method)
              at sun.awt.X11.XAtom.<init>(XAtom.java:219)
              at sun.awt.X11.XAtom.get(XAtom.java:146)
              at sun.awt.X11.XAtom.getAtomListProperty(XAtom.java:630)
              at sun.awt.X11.XAtom.getAtomListPropertyList(XAtom.java:644)
              at sun.awt.X11.XProtocol.checkProtocol(XProtocol.java:37)
              at sun.awt.X11.XNETProtocol.doStateProtocol(XNETProtocol.java:273)
              at sun.awt.X11.XWM.initializeProtocols(XWM.java:1178)
              at sun.awt.X11.XWM.<init>(XWM.java:113)
              at sun.awt.X11.XWM.getWM(XWM.java:559)
              at sun.awt.X11.XWM.init(XWM.java:1169)
              at sun.awt.X11.XToolkit.<init>(XToolkit.java:320)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
              at java.lang.Class.newInstance0(Class.java:350)
              at java.lang.Class.newInstance(Class.java:303)
              at java.awt.Toolkit$2.run(Toolkit.java:833)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
              at javax.swing.UIManager.initialize(UIManager.java:1262)
              at javax.swing.UIManager.maybeInitialize(UIManager.java:1245)
              at javax.swing.UIManager.getDefaults(UIManager.java:556)
              at javax.swing.filechooser.FileSystemView.getFileSystemView(FileSystemView.java:63)
              at org.openide.filesystems.FileUtil.<clinit>(FileUtil.java:49)
              ... 6 more
      Atom was 0

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
       Frame blah = new Frame("blah");
      ---------- END SOURCE ----------

      Attachments

        Activity

          People

            art Artem Ananiev (Inactive)
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Imported:
              Indexed: