OK, the problem was solved after a global Sling reboot ... (!?)
Now I'm taking a look to some other conf error ...
Il 1/5/21 2:01 PM, Nicola Cisternino ha scritto:
Hi Daniel ant thank you for example.
Your configs are similar to mine ...
... but it seems to be a further (strange) problem
Looking in the org.apache.sling.commons.crypto pom.xml I've noticed
the *jasypt* dependency ...
So I've installed and started the
*org.apache.servicemix.bundles.jasypt* bundle.
... but observing the log, a NoClassDefFoundError exception occurs:
05.01.2021 10:23:29.335 *ERROR* [FelixLogListener]
org.apache.sling.commons.crypto.jasypt.internal.JasyptRandomIvGeneratorRegistrar
bundle org.apache.sling.commons.crypto:1.0.0
(228)[org.apache.sling.commons.crypto.jasypt.internal.JasyptRandomIvGeneratorRegistrar(1139)]
: The activate method has thrown an exception
(java.lang.NoClassDefFoundError: *org/jasypt/iv/RandomIvGenerator*)
java.lang.NoClassDefFoundError: org/jasypt/iv/RandomIvGenerator
at
org.apache.sling.commons.crypto.jasypt.internal.JasyptRandomIvGeneratorRegistrar.activate(JasyptRandomIvGeneratorRegistrar.java:60)
[org.apache.sling.commons.crypto:1.0.0]
Also accessing to web console (...system/console/bundles) it can be
verified that the jasypt bundle correctly exports the "org.jasypt.iv"
package and, therefore, the RandomIvGenerator class ...
Nicola.
Il 12/28/20 3:07 PM, Daniel Klco ha scritto:
My mistake, I forgot that I made that repo private. I've copied the
relevant configurations here:
https://gist.github.com/klcodanr/41bf7c0e97a9b80b8547684ed0f72444
On Mon, Dec 28, 2020 at 3:46 AM Nicola Cisternino <ncis...@cointa.it>
wrote:
Hi Dan
and thank you for replay ...
... excuse me ... but ...
https://github.com/klcodanr/danklco.com-site-cna/blob/cloud-native-sling/feature/src/main/features/site.json
link is broken :-(
Il 12/26/20 5:19 PM, Daniel Klco ha scritto:
Hey Nicola,
The Apache Sling Commons Messaging Mail bundle uses Commons Crypto to
encrypt the password for the SMTP server. You'll need to provide the
configuration for Commons Crypto including:
-
org.apache.sling.commons.crypto.jasypt.internal.JasyptRandomIvGeneratorRegistrar
-
org.apache.sling.commons.crypto.jasypt.internal.JasyptRandomSaltGeneratorRegistrar
-
org.apache.sling.commons.crypto.jasypt.internal.JasyptStandardPBEStringCryptoService
- org.apache.sling.commons.crypto.internal.FilePasswordProvider
You can see the configuration (sans secrets) I use on my personal
website
here:
https://github.com/klcodanr/danklco.com-site-cna/blob/cloud-native-sling/feature/src/main/features/site.json
Once that's set up correctly you should see an option under the
'Available
crypto service' here:
[serverhost:port]/system/console/sling-commons-crypto-encrypt
From there you can enter your password to encrypt it and use it in
the org.apache.sling.commons.messaging.mail.internal.SimpleMailService
configuration.
Hope that helps!
-Dan
On Wed, Dec 23, 2020 at 5:36 AM Nicola Cisternino <ncis...@cointa.it>
wrote:
Hi all
I'm trying to compose and send emails (Sling 12) using Apache Sling
Commons Messaging Mail Bundle.
Can someone help me define a complete setup ?
All web examples refer to the use of AEM (CQ Mail service) :-(
I've already:
1) installed bundle
(org.apache.sling.commons.messaging.mail-1.0.0.jar)
2) solved bundle dependencies installing:
- javax.mail-1.6.2.jar
- org.apache.sling.commons.crypto-1.0.0.jar
- org.apache.sling.commons.messaging-1.0.0.jar
4) created and saved a "Simple mail service" configuration
(configMgr)
3) created a component using documentation example
(
https://github.com/apache/sling-org-apache-sling-commons-messaging-mail)
I don't see any log error ... but ...
@Reference
MailService mailService;
.... is always null ....
Thanks a lot.
Nicola.
--
Nicola Cisternino
CTO - Ergon Project Manager - IT Architect
Cointa s.r.l.
Tel. +39 080 9371015
ncis...@cointa.it
http://www.cointa.it