Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

java.rmi.server.ExportException: Port already in use

Posted on 2002-04-01
7
Medium Priority
?
11,630 Views
Last Modified: 2007-11-27
I'm writing an RMI application.
When running the RMIRegistry I get the following exception:

java.rmi.server.ExportException: Port already in use: 1099; nested exception is:
   java.net.BindException: Address in use: JVM_Bind
java.net.BindException: Address in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:405)
at java.net.ServerSocket.<init>(ServerSocket.java:170)
at java.net.ServerSocket.<init>(ServerSocket.java:82)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:30)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:312)
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:559)
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:222)
at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:176)
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:319)
at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:119)
at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:125)
at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:95)
at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:81)
at sun.rmi.registry.RegistryImpl.main(RegistryImpl.java:320)

What could be the cause and how I can solve this?
0
Comment
Question by:s_lavie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 9

Expert Comment

by:Venci75
ID: 6909998
probably you are trying to run a second instance of the RMI registry
0
 
LVL 2

Author Comment

by:s_lavie
ID: 6910007
I'm afraid this is not the reason...
0
 
LVL 9

Accepted Solution

by:
Venci75 earned 200 total points
ID: 6910012
There is an application that already uses the RMI registry default port (1099). If this is not another instance if the registry you can try to start your RMI registry on a different port:
rmiregistry 1111
where 1111 is the new port.
0
The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

 
LVL 2

Author Comment

by:s_lavie
ID: 6910020
It does run on another port, but how I can find which application uses port 1099.
My OS is win2000 - and I have no clue which application uses that port.
0
 
LVL 9

Expert Comment

by:Venci75
ID: 6910036
I don't know how you can do this. But you can try to check whether it is not done by a service.
0
 
LVL 9

Expert Comment

by:Venci75
ID: 6910038
... or may be another instance of the registry is started as a service
0
 

Expert Comment

by:rashidkamranbs
ID: 6911044
Of course another process using the 1099 port.. in windows 200 ya can execute a command like

c:\netstat -a

it will list all the process with listening ports..

0

Featured Post

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn different types of Android Layout and some basics of an Android App.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question