AEM 6.5 getTranslationObjectPreview returns null on starting all project jobs





com.adobe.granite.translation.api.TranslationObject#getTranslationObjectPreview is behaving inconsistently upon starting a translation job.


When I start a translation job in a translation project using the job tile dropdown, it returns the stream as expected.


However, when I select the translation project tile and click 'Start Translation Job(s)' the method returns null.


This happens regardless of content (tested with multiple different We.Retail pages) and amount of jobs. 




31.08.2020 09:19:59.317 *ERROR* [ [1598865596673] POST /libs/cq/gui/components/projects/admin/translation HTTP/1.1] com.adobe.cq.wcm.translation.impl.TranslationObjectImpl Error while generating preview {}
java.lang.NullPointerException: null
	at com.adobe.cq.wcm.translation.impl.TranslationObjectImpl.getPreviewResourceResolver( []
	at com.adobe.cq.wcm.translation.impl.TranslationObjectImpl.getTranslationObjectPreviewFileInputStream( []
	at com.adobe.cq.wcm.translation.impl.TranslationObjectImpl.getTranslationObjectPreview( []


Accepted Solutions (1)

Accepted Solutions (1)




First check that this service user exists : translation-preview


Second to that, log a ticket with Customer Care.  


Quick inspection of the source code, the resolverFactory has got to be the null object...


It's trying to get the resource resolver for the above service user : 


resolverFactory.getServiceResourceResolver(Collections.singletonMap( ResourceResolverFactory.SUBSERVICE, (Object) new String(TranslationUtils.TRANSLATION_PREVIEW_SERVICE_USER)));


There are getter/setter methods for the factory, so presumably however you're invoking the preview it's not calling the setter beforehand.


Please log a ticket with clear steps to reproduce



Answers (0)