|javax.mail issues with multipart messages [message #1234547]
||Wed, 22 January 2014 03:32
| Franck Mising name
Registered: July 2009
I am running into issues trying to send multipart mail messages from Virgo webapps.|
The exception is
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:885)
I think the root cause is the one described here:
I have been trying everything I could think of and I am not getting anywhere, has anyone got any luck with this?
My last attempt was to make javax.activation & javax.mail available from the system bundle, hoping that that would allow activation to see javax.mail's META-INF/mailcap, but that didn't work.
It looks like I may need to create a custom bundle wrapping javax.activation & java.xmail, but the main concern then is having several sources for javax.activation...
I can't adjust the context classloader since javax.mail is being invoked from 3rd party bundles.
Any suggestions would be really appreciated...
|Re: javax.mail issues with multipart messages [message #1258501 is a reply to message #1234547]
||Thu, 27 February 2014 07:59
| Martin Baumgartner
Registered: June 2013
Which version of javax.mail do you use? I had the same issue, but could fix it. Use Javax.mail 1.5 as it ships a osgi-Manifest.MF and change the classloader. |
ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
Ugly but works (for me).
Edit, I am not sure, if you need to change the classloader on virgo too. In our environment, we use virgo for development and websphere for production use. You should try without changing the classloader first.
[Updated on: Thu, 27 February 2014 08:06]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01969 seconds