aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes RMI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "RMI" Watch "RMI" New topic
Author

RMI

saravanan palanivel
Greenhorn

Joined: Sep 05, 2012
Posts: 9
Hi ,
I'm new to java. I trying RMI concept in jsp. in that i defined the server and client as method where we can pass parameter host name and port.
when i invoking the server and client method from another jsp it works fine for first time. but when invoking second time it says
"remote exceptionjava.rmi.server.ExportException: Port already in use: 3232; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
",
I dont know how to resolve it , please give some ideas...

Thanks in advance...
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8910
    
    8

Welcome to the JavaRanch. It's a good idea to show us your code and indicate where the error occurred so we have some idea as to what you are doing (see our FAQ: HowToAskQuestionsOnJavaRanch)
My wild guess would be that you are invoking Registry.bind() more than once. Once bound, a remote object is available until it is removed from the registry with a call to unbind().
And why would you mix RMI with servlets?


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

saravanan palanivel wrote:when i invoking the server and client method from another jsp it works fine for first time. but when invoking second time...


That appears to say that you are starting the RMI server from a JSP. Is that really true? It sounds to me like an extremely strange way to run a server. And if it is true, then naturally starting the server a second time, when it is already running, is going to lead to that error message.
 
Consider Paul's rocket mass heater.
 
subject: RMI