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...
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?
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.