-
Notifications
You must be signed in to change notification settings - Fork 605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EmailService not working due to unsatisfied reference to MailTemplateManager in AEM on prem #3471
Comments
We encountered the same problem. Additionally interface com.adobe.acs.commons.email.impl.MailTemplateManager is in wrong package. This makes the latest releases unusable for on-prem. @kwin please pay attention. |
@cziegeler do you know what's going on w/ this? Thanks! |
I think this should fix it: #3488 -- any chance you can try it out @Roman-Skripka ? |
It should not be required that the api is in a public package for as long as the on prem bundle is a fragment bundle. Either my understanding of a fragment bundle is wrong or there is something else. |
I don't see the Fragment-Host header in the bundles anymore; that might already be the problem |
The bnd configuration in the pom for the maven bundle plugin is complete ignored. I think this worked when I made the PR. |
The problem is that the parent pom has already a bnd configuration , therefore configurations further down are ignored |
I am pretty sure this once used to work: https://github.com/bndtools/bnd/blob/master/maven-plugins/bnd-maven-plugin/README.md#bnd-instruction-inheritance. The same approach is used inside https://github.com/adobe/asset-share-commons/blob/d574785ccca2d955878711b48029db7070fcf1af/core.cloud/pom.xml#L46-L50. However I can also see that this configuration is now completely disregarded... Something in here https://github.com/bndtools/bnd/blob/f9b2c857859dd3e46401f2f19aba4b09f308a16e/biz.aQute.bnd.maven/src/aQute/bnd/maven/lib/configuration/BndConfiguration.java#L39 does no longer seem to work correctly... Maybe it depends on the Maven version. With 3.9.9 it does no longer work! |
@davidjgonzalez yes, provided package fixes the problem, also I can see the on-prem bundle being present. |
@cziegeler @davidjgonzalez Seems to be an issue with how the bnd-maven-plugin deals with Maven configurations: bndtools/bnd#6390. A combination of execution configuration on parent level and global configuration on bundle module's levels is not treated correctly by bnd-maven-plugin. |
Previously the configuration from the parent (per execution id) was overriding the local config (per plugin). Now the parent configuration is no longer per execution id, i.e. both local plugin configurations (i.e. on plugin level and on execution id level) take precedence. This closes #3471
👍 |
Required Information
Expected Behavior
ACS Commons EmailService works in AEM on prem.
Actual Behavior
With #3422 (ACS Commons 6.9.0) MailTemplateManager was introduced and added as a reference to EmailService and the implementation for the MailTemplateManager was placed in bundle-cloud and bundle-onprem. Unfortunately the bundle-onprem is missing in acs-aem-commons-all-6.9.*.zip files. Looks like the dependency entry for bundle-onprem is missing in all/pom.xml.
I did a quick try and after adding the dependency to all/pom.xml bundle-onprem was part of the resulting zip file but the build failed with:
[ERROR] [artifact-rules] com.adobe.acs:acs-aem-commons-bundle-onprem:6.9.5-SNAPSHOT: The Adobe ACS Commons onprem bundle is not supported (adobe/consulting:acs-aem-commons-all:6.9.5-SNAPSHOT)
In addition to the missing bundle in the zip file it looks like something with the implementation is not working. I manually installed a locally build acs-aem-commons-bundle-onprem:6.9.4 but then the following error occurred:
java.lang.ClassNotFoundException: com.adobe.acs.commons.email.impl.MailTemplateManager not found by acs-aem-commons-bundle-onprem
Steps to Reproduce
For the first part of the issue AEM is not needed to reproduce this. Just open acs-aem-commons-all-6.9.*.zip and go to jcr_root\apps\acs-commons\install. There only acs-aem-commons-bundle is present and acs-aem-commons-bundle-onprem is missing.
With AEM navigate to http://localhost:4502/system/console/components and search for com.adobe.acs.commons.email.impl.EmailServiceImpl. The status will be "unsatisfied (reference)"
For the second part navigate to http://localhost:4502/system/console/components and search for com.adobe.acs.commons.email.impl.MailTemplateManagerImpl. The status will be "satisfied" and in the error.log of AEM there will be messages like:
java.lang.ClassNotFoundException: com.adobe.acs.commons.email.impl.MailTemplateManager not found by acs-aem-commons-bundle-onprem
The text was updated successfully, but these errors were encountered: