I recently spent a whole day trying to figure out a problem I was having with Tomcat 6. I had configured a connection pool for MySQL in my webapp’s META-INF/context.xml file and put a resource reference in WEB-INF/web.xml. However, when I tried deploying it to Tomcat, I kept getting the following error:
Cannot create JDBC driver of class '' for connect URL 'null'
Unfortunately, all the posts I found about solving this problem weren’t helpful to me. I had configured the connection correctly in the right format for context.xml for Tomcat 6, I had my JDBC Connector jar only in TOMCAT_HOME/lib, and so on.
Finally, however, I stumbled upon the problem: Tomcat was caching an old version of my context.xml that lacked the connection info. To solve this, I stopped Tomcat, deleted TOMCAT_HOME/conf/Catalina/localhost/mywebapp.xml, and then restarted this. After this, Tomcat had the correct version of context.xml, and my database connection worked correctly.
While this caching caused problems for connection pooling, I suppose that it could afflict anything that depends on changes in context.xml.