Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JNDI, xxx is already bound  RSS feed

 
peter tong
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • 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?
 
Andrew Moko
Ranch Hand
Posts: 55
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should you be binding or looking up the data source???
 
Kishore Jannarapu
Greenhorn
Posts: 2
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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: 250
  • Mark post as helpful
  • send pies
  • 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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!