Announcement Announcement Module
No announcement yet.
Sending Attachments with GNU implementation of javax.mail? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sending Attachments with GNU implementation of javax.mail?

    Hello forum, I hope this message finds you well.

    I've got a Spring MVC web application running on an IBM PowerPC server using GNU's implementation of javax.mail. I'm developing the application on a Windows box and using Apache Maven to manage the dependencies (marking certains ones as provided by the server, that sort of thing).

    When I try using the MimeMessageHelper to send mail with an attachment, I get an exception:
    java.lang.VerifyError: javax/mail/internet/MimeBodyPart.setDataHandler(Ljavax/activation/DataHandler;)V
    This code runs fine under Windows with Sun's implementation of javax.mail. Does anyone know of any outstanding issues with the GNU implementation and how to get around them? I know this isn't strictly a Spring question, so I really appreciate any help I can get.


  • #2
    It turned out that the sysadmin needed to add the javax.activation and javax.mail jars to the front of my application server's classpath. The OS package manager (yum in this case) would not allow us to install the application server (Tomcat in this case) with a different implementation of javax.activation and javax.mail.

    I hope this helps someone else.