Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

NameAlreadyBoundException

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
This cake looks terrible, but it tastes great! Now take a bite out of this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic