I just created a fresh Oracle Linux 7 VM with Tomcat 7 and Java 8_40. I've created several servers with Apache and Tomcat before, but never connecting to databases before. SELinux and firewalld are both off (for testing purposes.) I can't seem to get the jdbc configured correctly. Here's what I have:


<ResourceLink global="jdbc/JCAppsCoreDS" name="jdbc/JCAppsCoreDS" type="javax.sql.DataSource"/>


    <Resource name="jdbc/JCAppsCoreDS" auth="Container"
   username="******" password="*****"
   initialSize="5" maxActive="100" maxIdle="-1" maxWait="30"
   validationQuery="select 1 from dual"
   factory="org.apache.commons.dbcp.BasicDataSourceFactory" />

With the ***** being actual items of course. When I try to go to the URL of my application I get:

Naming exception Error while connecting to the database : javax.naming.NameNotFoundException: Name [jdbc/JCAppsCoreDS] is not bound in this Context. Unable to find [jdbc].

As far as I can tell, my config is correct, but I'm still getting errors. Anybody have any ideas? Also, I don't see much as far as this error goes in the logs. Does anyone know which logs and where I need to increase the log level? I've messed with them a bit, but haven't been able to get more info.



Did you configure the Resource reference in web.xml?

  • I did not, thanks for that! I'm still getting the same error though. What I'm doing is moving a Weblogic application over to Tomcat. I basically just grabbed the war file off of the Weblogic server and deployed it on my new Tomcat server. Maybe that'll help us come up with an answer? Thanks! – dlemp Feb 12 '16 at 14:11
  • Does anyone know of any logs that could be set to show any errors for this issue? I can't seem to find ANYTHING of any use in the logs currently. – dlemp Feb 18 '16 at 19:59
  • Did you configure the database in the GlobalNamingResources? – raupach Feb 25 '16 at 13:28
  • partial solution, new errors appeared, but it looks like a step forward – Damir Olejar Mar 14 '18 at 17:08

We just figured out the issue yesterday though, the applications we are trying to move from weblogic to tomcat calls the database in a way that weblogic recognizes, but tomcat does not. We're going to edit the database call and use spring to hopefully make everything work together. Thanks for the tips though!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.