javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
While searching the solution, found this question. Solution i found was adding MIME type handlers programmatically:
// add handlers for main MIME typesOthers solutions didn't work for me - i had recent activation.jar and mail.jar in WEB-INF/lib folder already. Can someone explain me why META-INF/mailcap file wasn't read from mail.jar?
MailcapCommandMap mc = (MailcapCommandMap)CommandMap.getDefaultCommandMap();
mc.addMailcap("text/html;; x-java-content-handler=com.sun.mail.handlers.text_html");
mc.addMailcap("text/xml;; x-java-content-handler=com.sun.mail.handlers.text_xml");
mc.addMailcap("text/plain;; x-java-content-handler=com.sun.mail.handlers.text_plain");
mc.addMailcap("multipart/*;; x-java-content-handler=com.sun.mail.handlers.multipart_mixed");
mc.addMailcap("message/rfc822;; x-java-content-handler=com.sun.mail.handlers.message_rfc822");
CommandMap.setDefaultCommandMap(mc);