dev@glassfish.java.net

Re: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain with JavaMail and Prelude

From: Lance J. Andersen <Lance.Andersen_at_Sun.COM>
Date: Mon, 10 Nov 2008 19:33:31 -0500

Hi Bill,

Thanks for the note. the mailcap below looks the same as what i have
run the TCK against.

Regards
Lance

Here is the mailcap from javax.mail.jar in prelude

#
# @(#)mailcap 1.8 05/04/20
#
# Default mailcap file for the JavaMail System.
#
# JavaMail content-handlers:
#
text/plain;; x-java-content-handler=com.sun.mail.handlers.text_plain
text/html;; x-java-content-handler=com.sun.mail.handlers.text_html
text/xml;; x-java-content-handler=com.sun.mail.handlers.text_xml
multipart/*;;
x-java-content-handler=com.sun.mail.handlers.multipart_mixed;
x-java-fallback-entry=true
message/rfc822;;
x-java-content-handler=com.sun.mail.handlers.message_rfc822
#
# can't support image types because java.awt.Toolkit doesn't work on servers
#
#image/gif;; x-java-content-handler=com.sun.mail.handlers.image_gif
#image/jpeg;; x-java-content-handler=com.sun.mail.handlers.image_jpeg

Here is the mailcap file from the mail.jar i use for standalone TCK
#
# @(#)mailcap 1.8 05/04/20
#
# Default mailcap file for the JavaMail System.
#
# JavaMail content-handlers:
#
text/plain;; x-java-content-handler=com.sun.mail.handlers.text_plain
text/html;; x-java-content-handler=com.sun.mail.handlers.text_html
text/xml;; x-java-content-handler=com.sun.mail.handlers.text_xml
multipart/*;;
x-java-content-handler=com.sun.mail.handlers.multipart_mixed;
x-java-fallback-entry=true
message/rfc822;;
x-java-content-handler=com.sun.mail.handlers.message_rfc822
#
# can't support image types because java.awt.Toolkit doesn't work on servers
#
#image/gif;; x-java-content-handler=com.sun.mail.handlers.image_gif
#image/jpeg;; x-java-content-handler=com.sun.mail.handlers.image_jpeg


Bill Shannon wrote:
> Lance J. Andersen wrote:
>> Has anyone seen the following exception using JavaMail and Prelude?
>> This is from a JavaBean invoked from a JSP.
> ...
>> INFO: javax.activation.UnsupportedDataTypeException: no object DCH
>> for MIME type text/plain
>
> Probably the JavaMail implementation in Prelude is broken and doesn't
> include
> the mailcap file that provides the mapping from MIME type to
> DataContentHandler.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>