In Fuse 6.1, JavaMail fails to send an attachment with an empty message body

Solution Verified - Updated -

Issue

An application running on JBoss Fuse 6.1 attempts to create an outbound mail message with an attachment but no message body, using the JavaMail API. The JavaMail operation fails with the following exception:

java.io.IOException: javax.mail.MessagingException: Empty multipart: multipart/related; 
    boundary="----=_Part_1_1764158333.1411422992098"
    at com.sun.mail.handlers.multipart_mixed.writeTo(multipart_mixed.java:105)
    at javax.activation.DataHandler.writeTo(DataHandler.java:77)
    at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1485)
    at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.j

The same operation succeeds in a stand-alone Java application.

Environment

  • Red Hat JBoss Fuse
    • 6.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.