<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>How to resolve the error of the java.lang.LinkageError in the email service</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120540985" />
  <subtitle>How to resolve the error of the java.lang.LinkageError in the email service</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120540985</id>
  <updated>2026-04-03T23:44:06Z</updated>
  <dc:date>2026-04-03T23:44:06Z</dc:date>
  <entry>
    <title>How to resolve the error of the java.lang.LinkageError in the email service</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120540984" />
    <author>
      <name>Bhargav Vaghasiya</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120540984</id>
    <updated>2021-01-07T17:18:38Z</updated>
    <published>2021-01-07T11:07:44Z</published>
    <summary type="html">&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;I am working on one project which is build with &lt;strong&gt;liferay 7.0.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Currently we have three servers DEV, Staging, and Production&lt;/p&gt;
&lt;p&gt;We have done &lt;strong&gt;same email SMTP configurations&lt;/strong&gt; in all
  three servers. but it is not working in two servers, only working in
  one server.&lt;/p&gt;
&lt;p&gt;It is working in Staging. &lt;strong&gt;Note that we have created
    production server from copy of the Liferay from Staging.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;WE are getting following errors in the production while &lt;strong&gt;user
    creates an account &lt;/strong&gt;on our production server&lt;/p&gt;
&lt;p&gt;------------------------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;Exception in thread &amp;quot;liferay/mail-2&amp;quot;
  java.lang.LinkageError: loader constraint violation: loader
    (&lt;strong&gt;instance of &amp;lt;bootloader&amp;gt;&lt;/strong&gt;) previously
  initiated loading for a different type with name
  &amp;quot;&lt;strong&gt;javax/activation/DataHandler&lt;/strong&gt;&amp;quot;&lt;br /&gt;    at
  javax.mail.internet.MimeMessage.setContent(MimeMessage.java:1428)&lt;br /&gt;  
   at com.liferay.util.mail.MailEngine.send(MailEngine.java:347)&lt;br /&gt;  
   at com.liferay.util.mail.MailEngine.send(MailEngine.java:457)&lt;br /&gt;  
   at
  com.liferay.mail.messaging.MailMessageListener.doMailMessage(MailMessageListener.java:94)&lt;br /&gt;  
   at
  com.liferay.mail.messaging.MailMessageListener.doReceive(MailMessageListener.java:109)&lt;br /&gt;  
   at
  com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)&lt;br /&gt;  
   at
  com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)&lt;br /&gt;  
   at
  com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)&lt;br /&gt;  
   at
  com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756)&lt;br /&gt;  
   at
  com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)&lt;br /&gt;  
   at java.lang.Thread.run(Thread.java:748)&lt;/p&gt;
&lt;p&gt;------------------------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;I have also tried after clearing server cache.&lt;/p&gt;
&lt;p&gt;I have searched a lot for this issue but i am not finding any propersolution&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;1. What are the possible cause for this issue.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;2. Is it possible there are some configuration done (By old
    developer) from the JAR?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;3. How can i overcome this situation&lt;/strong&gt;&lt;/p&gt;</summary>
    <dc:creator>Bhargav Vaghasiya</dc:creator>
    <dc:date>2021-01-07T11:07:44Z</dc:date>
  </entry>
</feed>
