Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ExportException: Port already in use: 1099; nested exception

843793Jan 4 2007 — edited Jan 6 2007
hi,

Im running a RMI program but every now and then i get the following error. Is there a way to stop this from happening because i kill of all the process in the IDE yet it still comes up with the error. So at the moment i have to restart my PC.

java.rmi.server.ExportException: Port already in use: 1099; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:310)
at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:218)
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:393)
at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:129)
at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:190)
at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:78)

public class ChatServer
{
public ChatServer()
{
try
{
Chat c = new ChatImp();
LocateRegistry.createRegistry(1099);
Naming.rebind("rmi://localhost:1099/chat", c);
}
catch (Exception e)
{
e.printStackTrace();
}
}

public static void main(String args[])
{
new ChatServer();
}
}

Message was edited by:
tbr_84
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 3 2007
Added on Jan 4 2007
5 comments
5,109 views