Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

One of the resources defined in context.xml not working

 
Ben Zung
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ilari Moilanen
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
Ben Zung
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Ben
 
Ilari Moilanen
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no problem.
BTW you are missing the < before the third resource there...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic