直接运行main方法没有错误,在tomcat下调用发送邮件出错
2014-11-18 23:07:29,653 ERROR [Timer-1] com.sily.publish.TieBaSend.process(TieBaSend.java:67) {} - Method not yet implemented
java.lang.UnsupportedOperationException: Method not yet implemented
at javax.mail.internet.MimeMultipart.<init>(MimeMultipart.java:37)
at org.apache.commons.mail.MultiPartEmail.createMimeMultipart(MultiPartEmail.java:545)
at org.apache.commons.mail.MultiPartEmail.init(MultiPartEmail.java:172)
at org.apache.commons.mail.MultiPartEmail.getContainer(MultiPartEmail.java:522)
at org.apache.commons.mail.HtmlEmail.build(HtmlEmail.java:534)
at org.apache.commons.mail.HtmlEmail.buildMimeMessage(HtmlEmail.java:519)
at org.apache.commons.mail.Email.send(Email.java:1436)
at com.sily.email.SendHtmlEmail.send(SendHtmlEmail.java:221)
at com.sily.publish.TieBaSend.process(TieBaSend.java:57)
at com.sily.publish.IPCompTimerTask.run(IPCompTimerTask.java:26)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
jar包冲突
主要还是在proxool包中, 需要排除掉下面的jar包才能执行,
<groupId> geronimo-spec</groupId>
<artifactId> geronimo-spec-javamail</artifactId >
<version> 1.3.1-rc5</version >