Add to Google Reader or Homepage

Javax.naming.NameAlreadyBoundException

                                If you glance at the title you could have an idea about this exception. It says that Name is Already bounded. 

What does it mean? 


When we are dealing with RMI, we know that the server needs to register the remote object in the RMI registry with a name. The client will use this name to get the remote object.I  have already explained this in my post Java RMI tutorial.Here we have to know one thing that each remote object should be registered with a unique name.

So it is obvious that when two different remote objects are registered with same name then this exception will be thrown for example, if we do like this, then this exception will be thrown.

.....................
.............................
.............................
 Context namingContext = new InitialContext();
namingContext.bind("rmi:central",store);//binding the remote object store with name central
namingContext.bind("rmi:central",shop);
//binding the remote object shop with name central

What are the other reasons?

 In the above shown exmaple, i have registered two different remote objects with same name and so i got this exception thrown, "but the other common reason is trying to  re-bind the object with the same name". 

 When this kind of situation occurs?


I have already told in my post  Executing java RMI that to execute an RMI we need to start the rmi registry first and then execute the server and then client. If you set the codebase property correctly it will work fine, but when you try to re-execute the  server you may have encountered this exception even though codebase is set correctly. why? because "you have actually tried to re-bind the object that is already bounded with the same name".

Here you should understand that "as long as RMI registry is running the entries of the registry persists until the RMI registry is stopped". so when re-executing the server ensure that  the  RMI registry is re-started again.




26 comments:

Naviya Nair said...

Great and Useful Article.

Online Java Course

Java Online Training

Java Course Online

J2EE training

online J2EE training

Best Recommended books for Spring framework

Java Interview Questions








Java Training Institutes in Chennai

Java Training in Chennai

J2EE Training in Chennai

java j2ee training institutes in chennai

Java Course in Chennai

Priya Tamil said...

Great information on shared,everything is fine about your blog information.These articles was very useful in my studies,i clearly understand about the information.
java training

Rekhila Pk said...

Awesome..You have clearly explained ...Its very useful for me to know about new things..Keep on blogging..
Java Training in Chennai

Shami S said...

the blog is very nice and informative. thank you for sharing the blog with us. keep on updating.

Java training in Chennai

Priya Tamil said...

Hi I read your post very carefully and I think you are right that a well written post should be at least a 100 words and should capture the essence of your blog, book or article.

SEO Training in Chennai

Camellia Canan said...


I have been following you for a couple of months now but this is my first time commenting on a blog post. Thank you for sharing your knowledge and experience with us. Keep up the good work. Already bookmarked for future reference.

SAP training in Chennai

Suseela Susiee said...


Great and useful article. Creating content regularly is very tough. Your points are motivated me to move on.


SEO Company in Chennai

Abiya Carol said...

This blog is having the general information. Got a creative work and this is very different one.We have to develop our creativity mind.This blog helps for this. Thank you for this blog. This is very interesting and useful.

ccna training in chennai mylapore

Geetha Arcus infotech said...

My Arcus offer java training with 100% placement. Our java training course that includes fundamentals and advance java training program with high priority jobs. java j2ee training with placement having more exposure in most of the industry nowadays in depth manner of java

java training in chennai

Keerthi said...

It's like you read my mind! You seem to know a lot about this, like you wrote the book in it or something. I think that you can do with some pics to drive the message home a little bit, but instead of that, this is fantastic blog. A great read. I will definitely be back.

Online Training in Chennai

Sathya G said...

the blog is very interesting and will be much useful for us. thank you for sharing the blog with us. please keep on updating.
ROI Services in Chennai

Sowmiya said...

this blog is really different and it is really helpful too thanks for sharing these unique information it is really awesome too.


Digital Marketing services in Chennai

Abiya Carol said...

This blog is having the general information. Got a creative work and this is very different one.We have to develop our creativity mind.This blog helps for this. Thank you for this blog. This is very interesting and useful.

PPC Services in Chennai

Sathya G said...

the blog is very useful, interesting and informative. thank you for sharing the blog with us. keep on updating.
SEO Company In Chennai

Sowmiya said...

This idea is mind blowing. I think everyone should know such information like you have described on this post. Thank you for sharing this explanation.Your final conclusion was good. We are sowing seeds and need to be patiently wait till it blossoms.

Best Informatica Training Institute in Chennai

Harish Raju said...

This blog having the details of Processes running. The way of runing is explained clearly. The content quality is really great. The full document is entirely amazing. Thank you very much for this blog.
Web Designing Training in Chennai

Sathya G said...

Thank you for taking the time to discuss this informative content with us. I feel happy about the topic that you have shared with us. keep sharing your information regularly for my future reference. This content creates a new hope and inspiration with me. Thanks for sharing article. The way you have stated everything above is quite awesome. Keep blogging like this. Thanks.
Hadoop Training in chennai

deeksha said...

Your idea is really mind blowing and it is very well interesting information.it had helped me a lot and i got more relevant thing.

ccna Training in Chennai

Jeffy said...

Thank you for sharing such a nice and interesting blog with us. Hope it might be much useful for us. keep on updating...!!
seo company in india
digital marketing company in india
seo company in chennai
digital marketing company in chennai

Shalini said...

Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.thank you for sharing such a great blog with us. expecting for your.

seo company in india

Evangeline Mitul said...

Really nice information you had posted. Its very informative and definitely it will be useful for many people

Best Dental Clinic In Velachery

tessa tessa said...

wow really nice. It will be helpful for the people those who are ready to crack the interview and please also for remind what they have learned throughout concept.

Web Design Company in Chennai

Akshaysri said...

Such a great articles in my carrier, It's wonderful commands like easiest understand words of knowledge in information's.
New Zealand Education Consultants in Chennai


Philips Huges said...


Nice Sharing..! I have been following you for a couple of months now but this is my first time commenting on a blog post. Thank you for sharing your knowledge and experience with us. Keep up the good work. Already bookmarked for future reference.

Installment loans in Mississippi
Payday loans in Mississippi
Title loans in Mississippi

Sophia sage said...

The given information was very excellent & Great tips, and awesome way to get exert tips from everyone, not only i like that post all peoples like that post, because of all given information was wonderful and it's very helpful for me.
Facility management companies in Chennai
Manpower agencies in chennai
Flats cleaning in Chennai
Toilet cleaning in Chennai

Philips Huges said...

Its very useful to me. Wonderful blog.. Thanks for sharing informative Post.

Installment loans
Payday loans
Title loans

Post a Comment

 
java errors and exceptions © 2010 | Designed by Chica Blogger | Back to top