August 26, 2003 - Tomcat and JBuilder. Or: Why won't my jdbc datasources work.
Just a quick tip that I couldn't quite figure out at first. And based on the sheer number of people in newsgroups out there asking for help, a lot of people are having trouble with it.
Problem: You have your webapp working fine with tomcat. Everything works. You can read data from the database fine using your pooled database connection provided by tomcat. You have a wonderful and perfectly crafted (okay, cobbled together) server.xml file that tomcat is happy with.
Symptom: You want to work with the tomcat provided with jbuilder. When you first push run, you think to yourself, "There's no way this can work". Sadly, you're right. You see a ton of error messages about not being able to find your datasource. Light goes on in your head. You go mucking about and realize that tomcat will use it's own server.xml file, disregarding whatever desires you have.
Solution: If you're working with your project in '~/jbproject/projectname', you will notice a 'Tomcat' subdirectory created in there. What you need to do is start up the integrated tomcat. Open the conf/server.xml file that's created in you're project's Tomcat directory. Add your changes regarding datasource. Save file. Then grab an official tomcat installation from the web. Add the tyrex jarfile to your project and make it a required library (May be a few other required libraries depending on your project. May also need activation.jar and jdbc ext jarfile).
This worked for me, and it works pretty well. As soon as you alter a file, the changes seem to be reflected on the server instantly (altho I haven't played with that too extensively). I still don't like it as much as resin tho.