Expand my Community achievements bar.

SOLVED

Published Templates appear as "null" on Publisher

Avatar

Employee

Hi All,

 

When I publish a template from Author it appears as "null" on publisher as per the screenshot attached.

 

If I create a package and manually upload it to publisher it works this problem is specific to using the "publish" functionality from author.

 

I have validated that the replication queue is clear and working correctly.

 

AEM 6.5.16

 

The logs from publisher show the following:

 

04.04.2024 14:35:22.739 *WARN* [EventAdminAsyncThread #10] org.apache.felix.eventadmin Service [com.adobe.cq.mcm.campaign.impl.CampaignPageCopyEventHandler,2775, [org.osgi.service.event.EventHandler]] EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=com/day/cq/wcm/core/page] {modifications=[{path=/conf/sitepublico/settings/wcm/templates/test_adobe, modifiedDate=Thu Apr 04 14:35:22 BST 2024, type=PageCreated, userId=replication-receiver}]} | [org.osgi.service.event.EventHandler] | Bundle(com.day.cq.mcm.cq-mcm-campaign [362])] (java.lang.NullPointerException) java.lang.NullPointerException: null at com.adobe.cq.mcm.campaign.impl.CampaignPageCopyEventHandler.cleanUp(CampaignPageCopyEventHandler.java:62) [com.day.cq.mcm.cq-mcm-campaign:1.3.28] at com.adobe.cq.mcm.campaign.impl.CampaignPageCopyEventHandler.handleEvent(CampaignPageCopyEventHandler.java:102) [com.day.cq.mcm.cq-mcm-campaign:1.3.28] at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415) at org.apache.felix.eventadmin.impl.tasks.HandlerTask.runWithoutBlacklistTiming(HandlerTask.java:82) [org.apache.felix.eventadmin:1.5.0] at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:104) [org.apache.felix.eventadmin:1.5.0] at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:166) [org.apache.felix.eventadmin:1.5.0] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750)

null.png

 

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi All,

 

Turns out the template nodes on publisher were different to Author some nodes were missing "structure".

 

I ran a activation tree replication on the path for templates and it seems to have resolved the issue.

 

Thanks,

Sandeep

View solution in original post

6 Replies

Avatar

Community Advisor

Is this Nullpointer exception coming for all Publish events or only to Template publish?

From the logs : NullPointer exception coming with class : CampaignPageCopyEventHandler

 

do you have any integration with Adobe Campaign?

which is part of the Adobe Campaign integration in AEM. This suggests that there might be an issue with your Adobe Campaign integration.

 

Template Properties to validate once: Check the properties of the template that you're trying to publish. There might be a property that is required by the CampaignPageCopyEventHandler class but is not set or is set to an invalid value.

Avatar

Community Advisor

What are you seeing in the replication log when you try to publish this?



Esteban Bustamante

Avatar

Community Advisor

@sssaadw , Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community

Avatar

Community Advisor

The issue you're experiencing with publishing templates from the Author instance to the Publisher in AEM 6.5.16, where templates appear as "null" on the Publisher, seems to be related to an exception thrown by the com.adobe.cq.mcm.campaign.impl.CampaignPageCopyEventHandler. The NullPointerException in the log indicates a problem within the Campaign integration's event handling when templates are published.

Here are steps to troubleshoot and potentially resolve this issue:

  1. Verify Campaign Integration Configuration: The error originates from the Campaign integration's event handler. Check the configurations related to Adobe Campaign to ensure they are correctly set up and that there are no missing or incorrect configurations which could lead to NullPointerException.

  2. Check Template and Related Resources: Ensure that the template and any resources it depends on (like sling models, scripts, or components) are correctly set up and there are no missing references. Sometimes, issues with template dependencies can cause unexpected behavior during replication.

  3. Review Custom Event Handlers: If you have custom event handlers related to page or template creation, ensure they are correctly handling null cases or unexpected values. The issue might be indirectly caused by another event handler's reaction to template creation or replication events.

  4. Update or Disable the Problematic Service: If the CampaignPageCopyEventHandler service is not critical for your immediate needs, consider temporarily disabling it to verify if that resolves the issue. If the service is crucial, check for updates or patches from Adobe that address this issue.

  5. Replication and Dispatcher Flush: Although the replication queue is clear, ensure that there's no issue with the dispatcher cache that might be serving stale or incorrect data. Manually flush the cache if necessary to ensure that changes are correctly reflected.

  6. Adobe Support and Patches: Since this issue is specific to a particular functionality and involves an exception in a Campaign-related component, check the Adobe support portal for any known issues or patches for AEM 6.5.16 that address this problem.

  7. Logs and Debugging: Increase the log level for the com.adobe.cq.mcm and related namespaces to DEBUG to gather more detailed information about what leads to the NullPointerException. This information can be invaluable in pinpointing the exact cause.

Given the specificity of the issue and its relation to Adobe Campaign integration, resolution might require a combination of configuration review, system updates, and potentially direct support from Adobe.

Avatar

Employee

Hi Brian, I think we have debug set for Adobe Campaign but the service itself is disabled, I do not think that this behavior is specific to campaign.

Avatar

Correct answer by
Employee

Hi All,

 

Turns out the template nodes on publisher were different to Author some nodes were missing "structure".

 

I ran a activation tree replication on the path for templates and it seems to have resolved the issue.

 

Thanks,

Sandeep