How to resolve the error of the java.lang.LinkageError in the email service

Bhargav Vaghasiya, modified 4 Years ago. New Member Posts: 5 Join Date: 12/9/20 Recent Posts

Hello

I am working on one project which is build with liferay 7.0.

Currently we have three servers DEV, Staging, and Production

We have done same email SMTP configurations in all three servers. but it is not working in two servers, only working in one server.

It is working in Staging. Note that we have created production server from copy of the Liferay from Staging.

WE are getting following errors in the production while user creates an account on our production server

------------------------------------------------------------------------------------------

Exception in thread "liferay/mail-2" java.lang.LinkageError: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "javax/activation/DataHandler"
    at javax.mail.internet.MimeMessage.setContent(MimeMessage.java:1428)
    at com.liferay.util.mail.MailEngine.send(MailEngine.java:347)
    at com.liferay.util.mail.MailEngine.send(MailEngine.java:457)
    at com.liferay.mail.messaging.MailMessageListener.doMailMessage(MailMessageListener.java:94)
    at com.liferay.mail.messaging.MailMessageListener.doReceive(MailMessageListener.java:109)
    at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
    at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
    at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
    at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756)
    at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
    at java.lang.Thread.run(Thread.java:748)

------------------------------------------------------------------------------------------

I have also tried after clearing server cache.

I have searched a lot for this issue but i am not finding any propersolution

1. What are the possible cause for this issue.

2. Is it possible there are some configuration done (By old developer) from the JAR?

3. How can i overcome this situation