Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Registering DCH runtime

8 views
Skip to first unread message

Akshay Trivedi

unread,
Feb 15, 2005, 6:43:00 AM2/15/05
to
Hi,

I am trying to write DCH (DataContentHandler) for message/delivery-status.

I am trying to register it runtime before calling
String s = MimeUtility.streamToString(mp.getBodyPart(1).getInputStream(),
"UTF-8")
with code below

MailcapCommandMap aMap = (MailcapCommandMap)
CommandMap.getDefaultCommandMap();
aMap.addMailcap( "message/delivery-status;;
x-java-content-handler=oracle.um.webmail.util.DeliveryStatusHandler" );

I have put logs just before and after this registration and those got
printed.

I have also added logs all over in DeliveryStatusHandler.java but seems my
DCH is not getting called as none of my message got logged.

Do you know anything else I should be doing to get this registration done?

Thanks,
Akshay


""Akshay Trivedi"" <Akshay....@oracle.com> wrote in message
> Hi All,
>
> I am having typical code like:
>
> Part p is available
> Multipart mp = (Multipart)p.getContent()
> mp.getBodyPart(1).getInputStream();
> String s = MimeUtility.streamToString(mp.getBodyPart(1).getInputStream(),
> "UTF-8");
>
>
> Top of my stack trace looks like:
> Stack Trace is:
> javax.activation.UnsupportedDataTypeException: no object DCH for MIME type
> message/delivery-status
> at javax.activation.DataHandler.getInputStream(DataHandler.java:230)
> at javax.mail.internet.MimeBodyPart.getInputStream(MimeBodyPart.java:459)
>
>
> Can somebody give me direction how do i impliemnt my DataHandler to
resolve
> this issue?
> I have found similar link
> http://www.mail-archive.com/serve...@james.apache.org/msg00660.html
>
> Where person is facing same issue but solution suggested is based on
> modifying mailcap file at <JAVA_HOME>/jre/lib. In my environment I do not
> see such file available.
>
> Thanks,
> Akshay
>


0 new messages