users@glassfish.java.net

Re: Issues with JavaMail in OSGi Bundle

From: Robert Weeks <RWeeks_at_ext-inc.com>
Date: Wed, 4 Aug 2010 11:07:06 -0700

Hi Martin -

Thanks for the reply.

I saw this thread when trying to figure out what was going on - but it didn't help me too much. We are using GF3.0.1 - and I have tried to much to get past this - including trying to bundle mail.jar with our bundle and accessing via Bundle-Classpath and others.

I will have to try some other tracks as well to get this working.

Thanks again for the suggestion.



Robert

take a look at
http://forums.sun.com/thread.jspa?threadID=5353050

hth
Martin


> From: RWeeks_at_ext-inc.com<mailto:RWeeks_at_ext-inc.com>
> To: users_at_glassfish.dev.java.net<mailto:users_at_glassfish.dev.java.net>
> Date: Wed, 4 Aug 2010 10:25:51 -0700
> Subject: Issues with JavaMail in OSGi Bundle
>
> Hello -
>
> We are seeing an issue we can't seem to get past when creating multipart mail messages within an OSGi bundle using JavaMail (the included module in Glassfish) - using v3.0.1.
>
> I have searched and have seen this issue, and it was said to be fixed, but we are seeing it quite readily.
>
> The error we are getting is:
>
> javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/alternative;
>
> I know this was caused by the JAF looking for the mailcap file within the META-INF directory - and there were some classloading issues that were present - but this was supposedly fixed in 3.0.
>
> If I look at the properties manually before I do any of the calls, I can see them there:
>
> MailcapCommandMap mc = (MailcapCommandMap) CommandMap.getDefaultCommandMap();
> for (String type: mc.getMimeTypes()) {
> log.debug(" Type ): " + type);
> }
>
>
> as well as I have tried to set them this way - but to no avail. We consistently get this message when trying set the content.
>
> Is anyone else still seeing this as well - and if so, how to get around it?
>
> I have tried quite a few routes and wanted to get anyone else's experiences with this.
>
> Thanks a lot.


--
Robert B. Weeks