Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » javax.mail issues with multipart messages
javax.mail issues with multipart messages [message #1234547] Wed, 22 January 2014 08:32 Go to next message
Franck Mising name is currently offline Franck Mising nameFriend
Messages: 92
Registered: July 2009
Location: France
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(

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 12:59 Go to previous message
Martin Baumgartner is currently offline Martin BaumgartnerFriend
Messages: 9
Registered: June 2013
Junior Member
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 13:06]

Report message to a moderator

Previous Topic:How are bundle jars copied to stage dir?
Next Topic:javax.xml jar processing takes more time in VIRGO
Goto Forum:

Current Time: Thu May 13 19:33:01 GMT 2021

Powered by FUDForum. Page generated in 0.01742 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top