Tomcat 5.5.20 bites me (in the butt) again
i was trying to getting the email notifications working in roller. Seemed like a very straightforward config. Uncomment the resource reference in web.xml and do the same for resource definiation in context.xml and also update the mail.smtp.host setting. All seemed good. i could even see the resource listed in Tomcat's Admin app under the roller context. However, here's the rub, when i tried to send an email, i would get this message in the roller.log file:
CommentServlet:sendEmailNotification - Unable to lookup mail session.
Check configuration. NamingException: Could not create resource factory instance
Of course, as usual, i had doubts about whether i did everything correctly or if i missunderstood something. So i spent a lot of time double checking the steps i was supposed to take. It all looked correct and yet the problem was still there. So now i decided to test on an older version of Tomcat i had installed, version 5.5.9. i copied over my webapp/roller dir and common/lib/activation.jar + mail.jar files and started it up. Guess what? It all worked without a problem. So i figured it wasn't me but Tomcat. Now i decided to try and figure out which version of Tomcat introduced the problem. i figured since there wasn't much noise on the net about this, i would start from the 5.5.20 and work down rather than 5.5.9 and work up. The next to latest version of Tomcat i found to download was 5.5.17. I repeated my deployment steps and started this version up. Bingo, it works. So something happened between 5.5.17 and 5.5.20, so i decided to search the Tomcat bug database. Nothing was an exact match, but i did find
this. Based on that bug i figured i would try taking the 5.5.17 naming-factory.jar and put it in 5.5.20. Guess what? It works. However i'm not sure what new bugs i introduced by doing this. So far so good though.
You might ask, why go to the effort of running 5.5.20 after all these problems? What not just run with 5.5.17? Well the main reason is my hosting provider has version 5.5.20 as part of it's software package and it's awfully troublesome to deviate from their standard packages. The are great and allow you install any other software that you want, however, if they offer the software as an installer, it's a maintenance issue to override it.
Posted at
11:48AM Mar 06, 2007
by Robert Eister in Software |