Monthly Archives: July 2010

Caching Problems with context.xml in Tomcat 6

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.


Random Thought of the Day: July 25, 2010

I occasionally wonder when we yearn in church for "a thousand tongues to sing" whether it might not be good to have it so that more than the 5 tongues on mics can actually be heard.


Random Thought of the Day: July 24, 2010

"Unpleasant" and "untrue" are not synonyms, and, contrary to what American culture says, this holds true even in matters of religion.


Random Thought of the Day: July 21, 2010

How creepy is Judge Turpin’s “Johanna”? You can just tell people “the really creepy song” in Sweeney Todd, and they’ll know which one you’re talking about!


Random Thought of the Day: July 19, 2010

I don’t know whether there will be any change to our physical features in heaven, but I know we’ll all look better because it has really good lighting :)


Random Thought of the Day: July 17, 2010

Christians should be careful how they use the word "cult"; while they often mean by it merely a heretical sect that has split off from orthodox Christianity, it is often used in the broader culture to refer only to dangerous extremist groups. So while groups such as Jehovah’s Witnesses and the Mormons are certainly heretical offshoots of Christianity, it may cause misunderstandings to refer to them as cults.


Random Thought of the Day: July 16, 2010

I’m a little scared about biodegradable packaging; I’ve seen how long my coworkers leave things in the department fridge…


Random Thought of the Day: July 13, 2010

Remember when Mel Gibson only played crazy, violent people? Or was the offscreen persona the act and the movies were actually real?


Random Thought of the Day: July 12, 2010

A promise in the Bible is not necessarily a promise for you.


Random Thought of the Day: July 9, 2010

If you’re a Christian who wants to date someone, and you discover they’re not a believer, that’s not strike 1—it’s strike 3.


Follow

Get every new post delivered to your Inbox.