What causes LinkageError: loader constraint violation:... javax/activation/DataHandler in JBoss EAP?

Solution Verified - Updated -

Issue

  • When attempting to set the DataHandler for a text/html mail message we see the following error in our log:

    ERROR [STDERR.write:156] java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) previously initiated loading for a different type with name "javax/activation/DataHandler"
    ERROR [STDERR.write:156]      at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:945)
    ERROR [STDERR.write:156]      at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1617)
    ERROR [STDERR.write:156]      at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1598)
    

Environment

  • JBoss Enterprise Application Platform (EAP) 5.0.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.