LinkageError problem when sending email in a JBoss AEM 6.5 Turnkey environment | Community
Skip to main content
Level 2
March 16, 2022
Solved

LinkageError problem when sending email in a JBoss AEM 6.5 Turnkey environment

  • March 16, 2022
  • 1 reply
  • 1044 views

We have a JBoss environment running AEM 6.5.

In our implementation, we are trying to send an email, but we are encountering the linkageerror with the com.sun.mail classes.

We did find this suggested fix (https://helpx.adobe.com/aem-forms/kb/day-cq-mail-service-not-working-forms-jee.html), but for some reason this doesn't work for us. 

Is this fix still valid for an AEM 6.5 environment, or should we do something else?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by haraldh86370342

@haraldh86370342 

We have been able to resolve this particular issue for multiple customers following the steps shared so there seems to be a disconnect.

Please raise a support ticket with us, we can troubleshoot the issue over a screen share.


Just for the  record, we have fixed our problem.

We did follow all steps and create our custom javamail bundle.

When we installed this, and we removed the other two javamail bundles that are installed by default, we no longer get any linkage errors or other mail problems.

1 reply

Pulkit_Jain_
Adobe Employee
Adobe Employee
March 17, 2022

@haraldh86370342 

I assume you're referring to "java.lang.LinkageError: loader constraint violation" error

 

Please be informed that there are two instances of the javax.mail classes (one provided by AEM, and one provided by JBoss), so sending mail from adaptive forms, etc will not work due to a class conflict.

 

You can follow the steps mentioned here[0] OR follow the first two steps, skip steps 3 and 4, and use the below procedure:
1. Figure out the bundle id of the original java mail. Say, 514, this time.
2. go to lauchpad\felix\bundle514\version0.0
3. retrieved the manifest.mf from bundle.jar
4. extract "Export Package:" section
5. append to javaxmail.mf
6. Resume step #5 mentioned in the URL[0]

 

Hope this helps! Let me know if the issue persists.

 

[0] - https://helpx.adobe.com/in/aem-forms/kb/day-cq-mail-service-not-working-forms-jee.html 

Level 2
March 17, 2022

Thanks for this suggestion.

However, for some reason this doesn't work in our instance. We have created this new bundle, with the copied export-package section, installed it and removed the other one, but we still keep getting the same error.

That's why I was wondering/asking if some other step needs to be done.

Pulkit_Jain_
Adobe Employee
Adobe Employee
March 17, 2022

@haraldh86370342 

We have been able to resolve this particular issue for multiple customers following the steps shared so there seems to be a disconnect.

Please raise a support ticket with us, we can troubleshoot the issue over a screen share.