• Post Reply Bookmark Topic Watch Topic
  • New Topic

NameAlreadyBoundException  RSS feed

 
Nandini Sriram
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying out a simple stateless bean that creates a table and inserts a few rows into it. When I try to deploy the bean, it gives the following during server (JBOSS) start-up:

and obviously the client says "easy-query not bound". The problem is I don't have any other object existing with the same name. This persists even when I change the JNDI name. Can someone please explain it to me?

Regards,
Nandini
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check what is in you deploy directory - there might be an old jar kicking around which uses the JNDI name. And run JBoss's jmx-console - it gives you a graphical view of what is in JNDI.
 
sandy comp
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
chek if u have another application delpoyed on same server machine using the same JNDI name. You can test if name already in use by using JNDI api. e.g. by using initialcontext and lookup.
 
Nandini Sriram
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I don't have the same JNDI name being used for another object. Also, the problem persists even if I change the JNDI name.

Regards,
Nandini
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens if you run the server without trying to deploy your easy-query EJB?
 
Nandini Sriram
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul,
When I try running the server without the DBQueryEJB, there's no problem during server start-up.

Regards,
Nandini
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you know that the problem must be in the DBQueryEJB jar file. So, carefully check your ejb-jar.xml for duplicate entries. Carefully check your deployment process to make sure your are not deploying the think twice. And run the jmx-console so you can actually see whats in JNDI once you've run your deployment process. Also watch the stack trace - make sure the NameAlreadyBoundException isn't a side effect of some earlier exception.

(Oh and clear out JBoss's temp directories before doing any of this)
[ July 08, 2004: Message edited by: Paul Sturrock ]
 
Nandini Sriram
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,

Thanks for your help
I did some changes to the descriptor files (there was a duplicate entry) and now it works fine.

Regards,
Nandini
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!