Expand my Community achievements bar.

Error while generating preview AEM 6.5.5

Avatar

Level 1

Hi,

we are trying to send some pages for translation using XTM plugin. During process preview should be generated and we encounter issue in regards to it. Did anyone had similar problems with 6.5.5 preview generation? Can someone suggest any solution? Here is what we have in logs:

06.08.2020 14:14:41.304 *ERROR* [JobHandler: /var/workflow/instances/server0/2020-08-06_1/sync_translation_job_2:/content/projects/test202008062/jcr:content/dashboard/gadgets/translationjob] com.adobe.cq.wcm.translation.impl.CQPagePreviewGenerator Error while generating preview {}
java.lang.NullPointerException: null
	at com.day.cq.wcm.msm.impl.LiveRelationshipManagerImpl.endRelationship(LiveRelationshipManagerImpl.java:283)
	at com.day.cq.wcm.core.impl.page.PageManagerImpl.internalCopy(PageManagerImpl.java:795)
	at com.day.cq.wcm.core.impl.page.PageManagerImpl.copy(PageManagerImpl.java:593)
	at com.day.cq.wcm.core.impl.page.PageManagerImpl.copy(PageManagerImpl.java:522)
	at com.day.cq.wcm.core.impl.page.PageManagerImpl.copy(PageManagerImpl.java:506)
	at com.adobe.cq.wcm.translation.impl.CQPagePreviewGenerator.generatePreview(CQPagePreviewGenerator.java:88)
	at com.adobe.cq.wcm.translation.impl.TranslationObjectImpl.getTranslationObjectPreviewFileInputStream(TranslationObjectImpl.java:1832)
	at com.adobe.cq.wcm.translation.impl.TranslationObjectImpl.getTranslationObjectPreview(TranslationObjectImpl.java:1846)
	at com.xtm.translation.connector.xtmforaem.core.impl.XtmTranslationService64Impl.uploadTranslationObject(XtmTranslationService64Impl.java:341) [com.xtm.translation.connector.xtm-for-aem.core:1.5.3.SNAPSHOT]
	at com.adobe.cq.wcm.translation.impl.TranslationObjectImpl.submitForTranslation(TranslationObjectImpl.java:432)
	at com.adobe.cq.wcm.translation.impl.TranslationPodImpl.startScopeRequest(TranslationPodImpl.java:1115)
	at com.adobe.cq.wcm.translation.impl.TranslationPodImpl.syncTranslation(TranslationPodImpl.java:2424)
	at com.adobe.cq.wcm.translation.impl.process.SyncTranslationProcess.syncTranslationJob(SyncTranslationProcess.java:154)
	at com.adobe.cq.wcm.translation.impl.process.SyncTranslationProcess.execute(SyncTranslationProcess.java:119)
	at com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:93)
	at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:191)
	at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:260)
	at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:502) [org.apache.sling.event:4.2.12]
	at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:293) [org.apache.sling.event:4.2.12]
	at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:60) [org.apache.sling.event:4.2.12]
	at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:229) [org.apache.sling.event:4.2.12]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)


and here is another one:

31.07.2020 13:55:20.800 *ERROR* [JobHandler: /var/workflow/instances/server0/2020-07-30/sync_translation_job_44:/content/projects/translation-dev-0731-2020/jcr:content/dashboard/gadgets/translationjob] com.adobe.cq.wcm.translation.impl.CQPagePreviewGenerator Error while generating preview {} java.lang.NullPointerException: null at com.day.cq.wcm.core.impl.page.PageManagerImpl.unmarkManuallyCreatedNodes(PageManagerImpl.java:633) [com.day.cq.wcm.cq-wcm-core:5.12.124.CQ655-B0001] at com.day.cq.wcm.core.impl.page.PageManagerImpl.internalCopy(PageManagerImpl.java:803) [com.day.cq.wcm.cq-wcm-core:5.12.124.CQ655-B0001] at com.day.cq.wcm.core.impl.page.PageManagerImpl.copy(PageManagerImpl.java:593) [com.day.cq.wcm.cq-wcm-core:5.12.124.CQ655-B0001] at com.day.cq.wcm.core.impl.page.PageManagerImpl.copy(PageManagerImpl.java:522) [com.day.cq.wcm.cq-wcm-core:5.12.124.CQ655-B0001] at com.day.cq.wcm.core.impl.page.PageManagerImpl.copy(PageManagerImpl.java:506) [com.day.cq.wcm.cq-wcm-core:5.12.124.CQ655-B0001] at com.adobe.cq.wcm.translation.impl.CQPagePreviewGenerator.generatePreview(CQPagePreviewGenerator.java:88) [com.day.cq.wcm.cq-wcm-translation:1.5.70] at com.adobe.cq.wcm.translation.impl.TranslationObjectImpl.getTranslationObjectPreviewFileInputStream(TranslationObjectImpl.java:1832) [com.day.cq.wcm.cq-wcm-translation:1.5.70] at com.adobe.cq.wcm.translation.impl.TranslationObjectImpl.getTranslationObjectPreview(TranslationObjectImpl.java:1846) [com.day.cq.wcm.cq-wcm-translation:1.5.70] at com.xtm.translation.connector.xtmforaem.core.impl.XtmTranslationService64Impl.uploadTranslationObject(XtmTranslationService64Impl.java:341) [com.xtm.translation.connector.xtm-for-aem.core:1.5.2.SNAPSHOT] at com.adobe.cq.wcm.translation.impl.TranslationObjectImpl.translateNow(TranslationObjectImpl.java:459) [com.day.cq.wcm.cq-wcm-translation:1.5.70] at com.adobe.cq.wcm.translation.impl.TranslationPodImpl.startTranslation(TranslationPodImpl.java:1211) [com.day.cq.wcm.cq-wcm-translation:1.5.70] at com.adobe.cq.wcm.translation.impl.TranslationPodImpl.syncTranslation(TranslationPodImpl.java:2428) [com.day.cq.wcm.cq-wcm-translation:1.5.70] at com.adobe.cq.wcm.translation.impl.process.SyncTranslationProcess.syncTranslationJob(SyncTranslationProcess.java:154) [com.day.cq.wcm.cq-wcm-translation:1.5.70] at com.adobe.cq.wcm.translation.impl.process.SyncTranslationProcess.execute(SyncTranslationProcess.java:119) [com.day.cq.wcm.cq-wcm-translation:1.5.70] at com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:93) [com.day.cq.workflow.cq-workflow-impl:6.3.8.CQ650-B0003] at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:191) [com.adobe.granite.workflow.core:2.0.240.CQ650-B0016] at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:260) [com.adobe.granite.workflow.core:2.0.240.CQ650-B0016] at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:502) [org.apache.sling.event:4.2.12] at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:293) [org.apache.sling.event:4.2.12] at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:60) [org.apache.sling.event:4.2.12] at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:229) [org.apache.sling.event:4.2.12] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)



5 Replies

Avatar

Employee Advisor

Hi Konrad,

that's very hard to tell. Are you sure that you pass non-null objects to PageManager.copy() methods? Did your code work with any previous AEM version?

 

Jörg

Avatar

Level 1

Hey,

Our code worked on previous versions like 6.3,6.4 and even 6.5.3 and we never encountered similar issues. 
We are still stack with the issue.


Avatar

Level 1

Hi Konard,

We are also using XTM TMS for Translation and integrated with AEM 6.5 version and we are also getting same error. See below screenshot:

Priyanka_Khete_0-1597922801048.png

 

Could you help me to resolve this issue? Seems you made some changes in aem and now it is working for you?

Avatar

Level 1

Hi,
unfortunately it didn't resolve the problem
However, we dug a little deeper and here are more details:

06_1/sync_translation_job_2:/content/projects/test202008062/jcr:content/dashboard/gadgets/translationjob] com.adobe.cq.wcm.translation.impl.CQPagePreviewGenerator Error while generating preview {}
java.lang.NullPointerException: null
at com.day.cq.wcm.msm.impl.LiveRelationshipManagerImpl.endRelationship(LiveRelationshipManagerImpl.java:283)

on the object TranslationObject in method uploadTranslationObject in our implementation AbstractTranslationService based on bootstrap sample from gitlab, we call method getTranslationObjectPreview, and later only methods from AEMs library are called. The problem is that in  internalCopy in com.day.cq.wcm.core.impl.page.PageManagerImpl node is copied. copy is saved only after relation is being destroyed at the end of processing. Before destroying this relation, aem tries to get the copy from db/files and it returns null (as copy wasn't created yet)
here is another issue related with it

2020/jcr:content/dashboard/gadgets/translationjob] com.adobe.cq.wcm.translation.impl.CQPagePreviewGenerator Error while generating preview {} java.lang.NullPointerException: null at com.day.cq.wcm.core.impl.page.PageManagerImpl.unmarkManuallyCreatedNodes(PageManagerImpl.java:633) [com.day.cq.wcm.cq-wcm-core:5.12.124.CQ655-B0001] at 

 

Avatar

Level 1

We never had similar issues on 6.3 nor 6.4 nor 6.5.3 versions. It might be related only to "live copy" content but we are not sure.
we dug a little deeper and here are more details:

06_1/sync_translation_job_2:/content/projects/test202008062/jcr:content/dashboard/gadgets/translationjob] com.adobe.cq.wcm.translation.impl.CQPagePreviewGenerator Error while generating preview {}
java.lang.NullPointerException: null
at com.day.cq.wcm.msm.impl.LiveRelationshipManagerImpl.endRelationship(LiveRelationshipManagerImpl.java:283)

on the object TranslationObject in method uploadTranslationObject in our implementation AbstractTranslationService based on bootstrap sample from gitlab, we call method getTranslationObjectPreview, and later only methods from AEMs library are called. The problem is that in  internalCopy in com.day.cq.wcm.core.impl.page.PageManagerImpl node is copied. copy is saved only after relation is being destroyed at the end of processing. Before destroying this relation, aem tries to get the copy from db/files and it returns null (as copy wasn't created yet)