I don’t know if this will do anyone any good (please leave a comment if it helps you!), but I want to get myself into the habit of blogging these sort of things for the potential good of other web searchers out there.
We were having the following problem: when starting an web app in Tomcat 6 that uses JNDI to locate a database connection, we got the exception:
javax.naming.NameNotFoundException: Name java:comp is not bound in this Context
Lots of people point out that this could be a problem with there being a JNDI implementation in the web app’s lib/, so that the app doesn’t get the global one defined by Tomcat, and they recommend removing all naming* JARs from lib/. But, in our case, it was catalina.jar that was causing the problem; it also includes a JNDI implementation.