Fine that is except a quartz scheduled job that emails out a report every day. It kept failing with -
Unable to send message - org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.NoSuchProviderException: smtp
Fedora comes with a non Sun java jdk as standard so first thing I did was replace that with the Sun java. No luck. Tried and checked the localhost mailserver - all fine. Probably tried another few dozen things until I found some old posting about making sure you don't have more than one activation.jar's on the classpath. My project included an activation.jar, so I removed that from the WEB-INF/lib. Even worse.
Eventually tracked it down to a link in /var/lib/tomcat5/common/lib linking to a copy of activation.jar in /usr/share/java. Removed the link, restarted Tomcat and everything was fine.
Normally I'd probably try and track down the issue a bit further rather than just go for the quick fix, but its a test and it works. The EC2 image won't go into production.
No comments:
Post a Comment