Customer says,
Our software is designed with the JDK1.4.0 beta 2 and JDK1.4.0 beta 3.
Our software uses several sockets and the problem seems to come from
sockets. In fact, we can't allocate a ServerSocket. The ServerSocket has
a listener waiting the connection on it. At creation, a
java.lang.NullPointerException is thrwon. I have no StackTrace (only the
exception).
The test case does not show the java.lang.NullPointerException, but
catches an exception "No buffer space avialable" after creating 17 server
sockets. Problem only on windows 98 not on NT, win 2000 or Solaris.
Test Case
import java.net.Socket;
import java.net.ServerSocket;
import java.io.IOException;
public class SocketCrasher
{
public static final int PORT_MIN = 9000 ;
public static final int PORT_MAX = 10000 ;
public static void main(String[] arg)
{
for (int i=PORT_MIN; i<PORT_MAX; i++)
{
ServerSocket ss = null ;
try
{
System.out.print("Testing socket " + i + "...") ;
ss = new ServerSocket(i) ;
System.out.println(" Socket OK") ;
}
catch (IOException ioe)
{
System.out.println(" Socket Error") ;
ioe.printStackTrace();
System.exit(0);
}
}
}
}
Our software is designed with the JDK1.4.0 beta 2 and JDK1.4.0 beta 3.
Our software uses several sockets and the problem seems to come from
sockets. In fact, we can't allocate a ServerSocket. The ServerSocket has
a listener waiting the connection on it. At creation, a
java.lang.NullPointerException is thrwon. I have no StackTrace (only the
exception).
The test case does not show the java.lang.NullPointerException, but
catches an exception "No buffer space avialable" after creating 17 server
sockets. Problem only on windows 98 not on NT, win 2000 or Solaris.
Test Case
import java.net.Socket;
import java.net.ServerSocket;
import java.io.IOException;
public class SocketCrasher
{
public static final int PORT_MIN = 9000 ;
public static final int PORT_MAX = 10000 ;
public static void main(String[] arg)
{
for (int i=PORT_MIN; i<PORT_MAX; i++)
{
ServerSocket ss = null ;
try
{
System.out.print("Testing socket " + i + "...") ;
ss = new ServerSocket(i) ;
System.out.println(" Socket OK") ;
}
catch (IOException ioe)
{
System.out.println(" Socket Error") ;
ioe.printStackTrace();
System.exit(0);
}
}
}
}
- relates to
-
JDK-4409308 ChannelSocket NullPointerException printing socketchannel info on Win98
-
- Closed
-