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

FtpDirectoryThread throws NullPointerException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.2.0
    • core-libs
    • beta
    • x86
    • solaris_2.6



      Name: jn10789 Date: 11/17/98


      When requesting a directory via ftp protocol using
      the java.net.URL class, I get the following exception
      (and trace):

      Exception occurred during event dispatching:
      java.lang.ExceptionInInitializerError: java.lang.NullPointerException
      at java.util.Hashtable.put(Compiled Code)
      at sun.net.www.protocol.ftp.FtpDirectoryThread.<clinit>(FtpURLConnection.java:195)
      at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Compiled Code)
      at java.net.URL.openStream(Compiled Code)
      at CssImageServer.listImageStems(Compiled Code)
      at KivaAttributeDialog.<init>(Compiled Code)
      at KivaNodePropertyAction.actionPerformed(Compiled Code)
      at com.sun.java.swing.AbstractButton.fireActionPerformed(Compiled Code)
      at com.sun.java.swing.AbstractButton$ForwardActionEvents.actionPerformed(Compiled Code)
      at com.sun.java.swing.DefaultButtonModel.fireActionPerformed(Compiled Code)
      at com.sun.java.swing.DefaultButtonModel.setPressed(Compiled Code)
      at com.sun.java.swing.AbstractButton.doClick(Compiled Code)
      at com.sun.java.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(Compiled Code)
      at java.awt.Component.processMouseEvent(Compiled Code)
      at java.awt.Component.processEvent(Compiled Code)
      at java.awt.Container.processEvent(Compiled Code)
      at java.awt.Component.dispatchEventImpl(Compiled Code)
      at java.awt.Container.dispatchEventImpl(Compiled Code)
      at java.awt.Component.dispatchEvent(Compiled Code)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Compiled Code)
      at java.awt.LightweightDispatcher.processMouseEvent(Compiled Code)
      at java.awt.LightweightDispatcher.dispatchEvent(Compiled Code)
      at java.awt.Container.dispatchEventImpl(Compiled Code)
      at java.awt.Window.dispatchEventImpl(Compiled Code)
      at java.awt.Component.dispatchEvent(Compiled Code)
      at java.awt.EventQueue.dispatchEvent(Compiled Code)
      at java.awt.EventDispatchThread.run(Compiled Code)

      I have verified manually that the directory is accessible
      via ftp on the command line. Here is the code:

        public String[] listImageStems() {
          
          InputStream istream ;
          URL url ;

          try
            {
              url = new URL(path) ;
              istream = url.openStream() ;
            }
          catch (MalformedURLException err)
            {
              showStatus(err.getMessage()) ;
              return (null) ;
            }
          catch (IOException err)
            {
              showStatus(err.getMessage()) ;
              return (null) ;
            }
            ...
        }
      (Review ID: 40863)
      ======================================================================

            jccollet Jean-Christophe Collet (Inactive)
            jdn Jeffrey Nisewanger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: