Expand my Community achievements bar.

SOLVED

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

Avatar

Level 2

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?

1 Accepted Solution

Avatar

Correct answer by
Level 2

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.

View solution in original post

5 Replies

Avatar

Employee Advisor

@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 

Avatar

Level 2

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.

Avatar

Employee Advisor

@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.

Avatar

Correct answer by
Level 2

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.