In order to reproduce the bug 3 Alfresco instances are required, A,B,C. A and B will replicate to C.
1)In A create folder H1, H2. H2 is child of H1. H1 contains H2
2)Create a replicating job to C, and execute it. Therefore C will contain H1containing H2
3)In B create H1 containing H3. Replicate to C using a replication job. Therefore C will contain H1 containing H2 and H3
Note: from this stage H1 and H3 become alien.
4)On A, create manually H3 under H1 and move H2 to H3. Before replication you should have H1 containing H3 containing H2 on A.
5)Replicate again from A to C.
-The attached exception.txt, the error reports remote.txt,local.txt attached.
Bug might be in AlienProcessorImpl.java in beforeDeleteAlien(NodeRef deletedNodeRef, ChildAssociationRef oldAssoc). This method makes the assumption that deletedNodeRef is always an alien, The described scenario proves that it is not always the case.