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)
One of the images referenced by the page had an issue with its properties.
The image causing issues was missing the
cq:lastReplicated property while it had the
javax.servlet.ServletException: java.lang.NullPointerException at com.day.cq.wcm.core.impl.reference.ActivationReferenceSearchServlet.doGet at org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService
Identify all the images which have this conflict:
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, 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:lastReplicatedAction properties, and activate the image again.