Expand my Community achievements bar.

SOLVED

ACS-COMMON-EMAIL service issue

Avatar

Level 4

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

1 Accepted Solution

Avatar

Correct answer by
Level 4

i restarted the acs-common service and it worked.

View solution in original post

9 Replies

Avatar

Employee Advisor

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

Avatar

Correct answer by
Level 4

i restarted the acs-common service and it worked.

Avatar

Employee Advisor

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

Avatar

Level 4

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

Avatar

Employee Advisor

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

Thanks,

Jörg

Avatar

Level 4

yes.

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

Avatar

Level 1

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

Avatar

Level 4

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.

Avatar

Employee Advisor

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