• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JNDI, xxx is already bound

 
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in weblogic, I set the data source with JNDI name = "JDBC/ALS", targets is AdminServer
then in java code, I want to connect to this datasource, I write


but there is exception as follow


javax.naming.NameAlreadyBoundException: ALS is already bound; remaining name 'JDBC'



what is the reason of this error?
how to connect to the datasource using jndi?
 
Ranch Hand
Posts: 55
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Should you be binding or looking up the data source???
 
Greenhorn
Posts: 2
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think with that name already an object bind in JNDI registry.. So use rebind(name,Object) method...
 
peter tong
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks, because I already bind the datasource in weblogic admin console, so when I bind the datasource again in code, javax.naming.NameAlreadyBoundException is thrown, thanks again.
reply
    Bookmark Topic Watch Topic
  • New Topic