Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI

 
saravanan palanivel
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9298
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Paul Clapham
Sheriff
Posts: 21126
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic