commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mihaela Tarjoianu" <mtarjoi...@eta2u.ro>
Subject [NTP] NTPClient - client.open(NtpV3Packet.NTP_PORT);
Date Fri, 02 Jun 2006 10:11:15 GMT
Hello everybody,

  I'm trying to run  NTPClient.java  from the package: examples.ntp,  but I receive the following
error:

java.net.BindException: Address already in use: Cannot bind
at java.net.PlainDatagramSocketImpl.bind(Native Method)
at java.net.DatagramSocket.bind(Unknown Source)
at java.net.DatagramSocket.<init>(Unknown Source)
at java.net.DatagramSocket.<init>(Unknown Source)
at java.net.DatagramSocket.<init>(Unknown Source)
at org.apache.commons.net.DefaultDatagramSocketFactory.createDatagramSocket(DefaultDatagramSocketFactory.java:57)
at org.apache.commons.net.DatagramSocketClient.open(DatagramSocketClient.java:117)
at examples.ntp.NTPClient.main(NTPClient.java:153)
java.lang.NullPointerException
at org.apache.commons.net.DatagramSocketClient.close(DatagramSocketClient.java:156)
at examples.ntp.NTPClient.main(NTPClient.java:173)
Exception in thread "main"


at the line:  client.open(NtpV3Packet.NTP_PORT);

I watched with TCPView and I saw no programm connected on 123. 
I reseted my pc and after that I received the same exception.

This line is right at the beginning of the program, the NTP server name does not matter now.

Do you have any ideea about what am I missing, or what am I doing wrong?

Thank you very much.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message