Hi ranchers, I have this problme that I could no figure out. Any help is appreciated. Following are part of the context.xml file for my application, which needs to make connections to any of them depending on user's selection.
The problme is, the application can obtain connections to db1, db2, db4 but never db3. The error message was "Name db3 is not bound in this Context". The way the application obtains connection is:
(dbName is either db1,db2,db3 or db4 and lowercased before being looked up)
And all the four databases are hosted by the same sql server. I checked there wasn't a typo or anything.
Thanks in adavance for your help.
Ben [ July 01, 2008: Message edited by: Ben Zung ]
I don't know the answer but throw some ideas to pinpoint the problem. Have you tried to move the DB3 definition to first in the list? Have you tried to rename the connection something other than DB3? Have you tired to rename the database to something other than DB3? (the last two just in case the word DB3 is reserved by tomcat or some other entity in the callstack)
Joined: Mar 25, 2004
Thanks for the reply. No I did not move it to the first in the list but doubt that would make a difference. And yes I have tried to rename it to something else and still broke. The name in the source is actually something else, I posted as "db3" for the purpose of asking the question. The real source name is "abdominaltrauma" and it is hard to imagine it is reserved anywhere.
Thanks you for looking at the problem.
Joined: Apr 15, 2008
no problem. BTW you are missing the < before the third resource there...
subject: One of the resources defined in context.xml not working