javax.naming.NamingException: Could not create resource factory instance [Root exception is java.lang.ClassNotFoundException: org.apache.naming.factory.MailSessionFactory]
Sorry for the cryptic title, but on occasion I run across an issue like this, and fail to inform other programmers after finding the solution.
Tomcat 5.5.2x is missing the MailSessionFactory class in naming-factory.jar. This JAR can be found in [tomcat install]\common\lib. Delete (or rename) it, and then copy over the naming-factory.jar from the Tomcat 5.5.17 common\lib instead. Apparently, the SendMailFactory class was missing as well.