ACS-COMMON-EMAIL service issue | Community
Skip to main content
Level 4
May 18, 2018
Solved

ACS-COMMON-EMAIL service issue

  • May 18, 2018
  • 9 replies
  • 5557 views

Hi All,

I am trying to reuse acs-common-email service.

i am referring to email service as:

acsEmailService.sendEmail(EMAIL_TEMPLATE, properties, recipients)

all variables are available and in place. But i am getting following error while buiding the project:

[91,44] cannot access javax.mail.internet.InternetAddress

[ERROR] class file for javax.mail.internet.InternetAddress not found.

I observed that there are 4 different sendEmail methods but the one i am using does not have InternetAddress field.

Any resolution?

Thanks,

Khalid

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 khalidMomin

i restarted the acs-common service and it worked.

9 replies

joerghoh
Adobe Employee
Adobe Employee
May 18, 2018

This looks like that you don't have the import statements for "javax.mail" in your pom. For AEM 6.4 you need this:

<dependency>

<artifactId>mail</artifactId>

<version>1.5.0-b01</version>

<groupId>javax.mail</groupId>

<scope>provided</scope>

</dependency>

(Version number might vary for older versions ...)

khalidMominAuthorAccepted solution
Level 4
May 21, 2018

i restarted the acs-common service and it worked.

joerghoh
Adobe Employee
Adobe Employee
May 21, 2018

Then I don't understand your problem. You reported a build problem and I assume that this build runs outside of AEM; and now the solution is to restart an AEM service?

Jörg

Level 4
May 22, 2018

sorry, i wanted to say that i added above dependency and restarted the bundle.

joerghoh
Adobe Employee
Adobe Employee
May 22, 2018

ah, ok. So you say, that adding the mentioned maven-dependency fixed the build and the resulting bundle is resolving?

Thanks,

Jörg

Level 4
May 22, 2018

yes.

and i was trying to mark your answer right, but its not allowing me to change.

pujam59259986
June 5, 2018

Hi All,

to use  acs common email service in our code bundle,we are  getting below error at time of taking build in jenkins

Failed to collect dependencies at com.adobe.acs:acs-aem-commons-bundle:jar:3.12.0: Failed to read artifact descriptor for com.adobe.acs:acs-aem-commons-bundle:jar:3.12.0: Could not transfer artifact com.adobe.acs:acs-aem-commons-bundle:pom:3.12.0 from/to adobe (https://repo.adobe.com/nexus/content/groups/public/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

please let me know,if anyone have solution for this.

Thanks in advance

Level 4
June 5, 2018

pujam59259986

1)

Looks like this is the issue with dependency or network as its not able to download/collect dependencies. Please check if you have below dependencies:

<dependency>

   <groupId>com.adobe.acs</groupId>

   <artifactId>acs-aem-commons-content</artifactId>

   <version>3.14.10</version>

   <classifier>min</classifier>

   <type>zip</type>

</dependency>

<dependency>

   <groupId>com.adobe.acs</groupId>

   <artifactId>acs-aem-commons-bundle</artifactId>

   <version>3.14.10</version>

</dependency>

please add the version of acs-common you are using.

2)

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

This could be an issue related to any security certificate you might be using in your code. I would recommend to make sure the code is able to read the certificate.

joerghoh
Adobe Employee
Adobe Employee
June 5, 2018

Hi,

can you please raise a new post for that topic, as it does not seem to be related to the original question? Thanks!

To your question: the JVM you are using to run Maven cannot validate the certificate chain for https://nexus.adobe.com; what JVM are you using? Can you raise the new question and  post the output of "mvn -version"? I would assume that you are using OpenJDK (which does not come with all the certificates preconfigured as Oracle Java does).

Jörg