When a page is activated in AEM, the activation fails with the following exception
javax.servlet.ServletException: java.lang.NullPointerException at com.day.cq.wcm.core.impl.reference.ActivationReferenceSearchServlet.doGet(ActivationReferenceSearchServlet.java:175) at org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:269)
This was happening because one of the images referenced by the page had an issue with it’s properties. The image causing issues was missing the cq:lastReplicated property while it had the cq:lastReplicatedBy and cq:lastReplicationAction properties.
SELECT * FROM dam:Asset AS parent INNER JOIN nt:base AS child ON ISCHILDNODE(child,parent) WHERE ISDESCENDANTNODE(parent, '/content/dam/journey/') AND child.cq:lastReplicated IS NULL AND child.cq:lastReplicatedBy IS NOT NULL
Once the assets are identified, check if these assets were actually replicated or not.
If yes, you can add the property cq:lastReplicated with the type Date and copy the date from the publish server.
In either case, you can remove the cq:lastReplicatedBy and cq:lastReplicatedAction properties and Activate the image once again.