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)
======================================================================