Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

email sending UnsupportedOperationException #13

Open
downgoon opened this issue Dec 9, 2016 · 2 comments
Open

email sending UnsupportedOperationException #13

downgoon opened this issue Dec 9, 2016 · 2 comments
Assignees
Labels
Projects

Comments

@downgoon
Copy link
Owner

downgoon commented Dec 9, 2016

exception stack is as follows

 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:505)
     at org.apache.commons.mail.MultiPartEmail.init(MultiPartEmail.java:176)
     at org.apache.commons.mail.MultiPartEmail.getContainer(MultiPartEmail.java:482)
     at org.apache.commons.mail.HtmlEmail.build(HtmlEmail.java:523)
     at org.apache.commons.mail.HtmlEmail.buildMimeMessage(HtmlEmail.java:508)
     at org.apache.commons.mail.Email.send(Email.java:1162)
@downgoon downgoon self-assigned this Dec 9, 2016
@downgoon
Copy link
Owner Author

downgoon commented Dec 9, 2016

find the problem

javax.mail.internet.MimeMultipart has been loaded but it's implementation may be out-of-date according to the exception stack mentioned above. so, search the target class javax.mail.internet.MimeMultipart by CTRL+SHIFT+T in Eclipse, we found two classes named the same name.

MimeMultipart class found

fix it

one is in resin-embed.jar and the other in geronimo-spec-javamail-1.3.1-rc3.jar. it is very likely that one of them is out-of-date. kick off one of them from classpath, see the result. if not ok, kick off the other one.

finally, geronimo-spec-javamail-1.3.1-rc3.jar is out-of-date.

by the way, javax.mail.internet.MimeMultipart is the mail specification in J2EE. Resin is a web container compliance with J2EE, it provides javax.mail implenmetation.

@downgoon
Copy link
Owner Author

downgoon commented Dec 9, 2016

a better way

to avoid depending on concrete web containers such as Resin or Tomcat, i decide to find an independent implementation and put it in $classpath. search javax.mail.internet.MimeMultipart in http://www.findjar.com and get mail-1.4.jar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
sys design
In Progress
Development

No branches or pull requests

1 participant