Tomcat 6 JNDI MySQL on Windows 7 Home Premium

Posted on 2009/11/08 by Randall.
Categories: Uncategorized.

I just got this working on my system. I was surprised that I didn’t see more info about this. The documentation from Apache says that you should use the MySQL driver for version 3. I am guessing that the newer driver (mysql-connector-java-5.1.10-bin.jar) is a big improvement over the old driver, which was written for MySQL v 3.

I couldn’t find any information on this, but I am here to confirm that you can get this working using the newest driver. I also suspected that I’d have trouble running this on Windows 7, but that was no problem. The last thing I did to make this work was that I added the info into a context.xml file that is kept in the META-INF folder.

Rebuilding on Linux

Posted on 2009/11/04 by Randall.
Categories: Uncategorized.

One of my goals while working on the new project is to be able to easily work from both of my machines. The desktop machine I use at home and my Dell Mini 9 which I can take with me to places like the library or the coffee shop.

Git has been great for this. It’s so easy keep things in sync using Git.

I did get a little tripped up when doing my Linux setup though. I did a “git pull” which created a folder whose name is the same name I wanted for my Eclipse project. I am keeping my Eclipse project configuration files out of the git db, so I had to create a new project in Eclipse on the Linux machine. The issue is that naming a project in Eclipse also applies the name to the folder which contains the project files. So I had a name collision between Git and Eclipse.

I ran Git first and then started Eclipse. I created a new Dynamic Web Project out of the File menu, and gave it a temporary name that was not the same as my Git folder. I then shut down Eclipse and pulled the project files into the Git folder. When I started up Eclipse again I ran “Import” from the File menu and opened the project from it’s new location.

When you go to right-click, Run-As in Eclipse you will see the next problem. The web-project is named according to the temporary name you chose earlier. The way around this is to search through various configuration files for the temporary name and change it to be the same as your Git db name.

And that’s about it!