Closed kwin closed 7 years ago
The reason for that is that the com.day.cq.replication.impl.ReplicationReceiverImpl
which is responsible for installing/extracing packages after they have been received through replication is not setting the classloader for the hooks accordingly.
The Package Manager in contrast sets the hook classloader correctly to the DynamicClassLoader
in com.day.crx.packmgr.impl.servlets.ServiceServlet
(through com.day.crx.packmgr.impl.MainServlet.activate(...)
).
I created https://issues.apache.org/jira/browse/JCRVLT-116 for a generic fix. But in AEM there is another dedicated InstallHookProcessor
being used, named JrVltInstallHookProcessor
. Therefore I opened a support ticket with Adobe.
This is tracked now in the internal Adobe bugtracker in CQ-86760 (no ETA for the fix though).
With AEM 6.3 (load 21) the bundle com.adobe.granite.replication.core
in version 6.2.26 only uses org.apache.jackrabbit.vault.packaging.JcrPackageManager
instead of com.day.jcr.vault.packaging.JcrPackageManager
. Therefore the fix being applied in https://issues.apache.org/jira/browse/JCRVLT-116 (also part of AEM 6.3) solves the problem for AEM 6.3.
Hi @kwin,
We are using AEM 6.2 for one of our client and use your wonderful project to manage ACLs. This issue is a bit painful for us since we have to manually install this package in order to trigger the hook on our publish instances.
Is there any way this issue is gonna be fixed on 6.2 ?
Best regards,
Maxime Nougarede
Hi @mnougarede, the only applicable workaround for AEM < 6.3 is to explicitly install those packages via the Package Manager UI (or the according ReSTful service) on each publish instance instead of relying on replication.
Hi @kwin, solved it. Thanks!
Although on the author instance you see no error, on the publish instance, the following error is logged when replicating a package which references the ACTool hook
This is due to wrong classloader being used to load the hook class (in contrast to what the package manager does). In fact it is the thread context class loader (which is never working in the OSGi context).