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.

Click here to read the bug report.

Leave a Comment

Comments are moderated. No profanity. Only <a>...</a>, <blockquote>...</blockquote>, and <code>...</code> are allowed.

Seperate paragraphs by pressing the "Enter" key twice, or press it once to break to a new line.

2 Comments

#01, Feb 01 2008

anonymousgami

God bless the jar mess that is a tomcat stack ;-)

Granted, it is still better than trying to mess with a lot of other app server/containers. Easier to find people with like problems at least.

#02, Feb 02 2008

Brian

Yeah, what stinks about a problem like this, is that even though Tomcat is a popular container, you always think it is a problem with the application JARs first. So only after an hour of troubleshooting do I hit a search engine.