Expand my Community achievements bar.

SOLVED

DAM OOTB Renditions not created.

Avatar

Level 2

Hi,

We are  uploading assets to DAM using JCROM API. We also have one custom workflow in AEM (6.1) which runs after a delay of 5 sec from the time of asset upload. Sometimes (not always) after image upload DAM OOTB asset workflow doesn't create renditions and it throws below error.

 

05.05.2016 08:15:18.727 *ERROR* [JobHandler: /etc/workflow/instances/server0/2016-05-03/model_3015090651838815:/content/dam/test/markets/global/en-gb/news/2016/1860x1050_5thmay.jpg/jcr:content/renditions/original] com.day.cq.dam.core.impl.gfx.CommonsGfxRenderer Could not render: wid=48&hei=48&fit=constrain,1&fmt=png-alpha&layer=comp&layer=0&src=/content/dam/test/markets/global/en-gb/news/2016/1860x1050_5thmay.jpg
java.lang.NullPointerException: null
    at com.day.cq.dam.core.impl.cache.CQBufferedImageCache.getCacheKey(CQBufferedImageCache.java:358)
    at com.day.cq.dam.core.impl.cache.CQBufferedImageCache.getImage(CQBufferedImageCache.java:101)
    at com.day.cq.dam.core.impl.gfx.CommonsGfxRenderer.createImageLayer(CommonsGfxRenderer.java:460)
    at com.day.cq.dam.core.impl.gfx.CommonsGfxRenderer.createLayer(CommonsGfxRenderer.java:138)
    at com.day.cq.dam.core.impl.gfx.CommonsGfxRenderer.render(CommonsGfxRenderer.java:91)
    at com.adobe.cq.gfx.impl.GfxImpl.render(GfxImpl.java:94)
    at com.day.cq.dam.core.impl.RenditionMakerImpl$PlanBasedTemplate.apply(RenditionMakerImpl.java:127)
    at com.day.cq.dam.core.impl.RenditionMakerImpl.generateRenditions(RenditionMakerImpl.java:184)
    at com.day.cq.dam.core.process.CreateThumbnailProcess.createThumbnails(CreateThumbnailProcess.java:119)
    at com.day.cq.dam.core.process.ThumbnailProcess.execute(ThumbnailProcess.java:76)
    at com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:93)
    at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:184)
    at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:232)
    at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:512)
    at org.apache.sling.event.impl.jobs.queues.JobRunner.run(JobRunner.java:205)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

 

Thanks,

Deepikaa

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hi,

Actually custom workflow isn't causing any issue. I just went to the line of code  in com.day.cq.dam.core.impl.cache.CQBufferedImageCache which was throwing null pointer .It was all about fetching properties of the asset.

As i was creating image nodes using jcrom api, tags property ( empty string []) was getting added which was causing the issue.

If tags property is there,we also need to have cq:taggable mixin else it throws this error.

Thanks,

Deepikaa

View solution in original post

5 Replies

Avatar

Level 7

Hi Deepikaa,

Since you are using custom workflow, could you set a debug point in your workflow and see from where the null pointer exception is coming. It looks like the workflow is triggered but because of some problem a null pointer exception is thrown. 

Debug > Indentify > handle the exception.

Please let us know if you are able to point out the issue after debugging.

Thanks

Tuhin

Avatar

Level 10

what is the custom workflow you are running in 5sec delay ?

can you make it to 1min delay and see if you face this issue ?

Avatar

Level 7

Good catch (as always). Might be within that time all the resources are not getting available. 

@Deepikaa, Please try what Loki has mentioned.

 

Thanks

Tuhin

Avatar

Correct answer by
Level 2

Hi,

Actually custom workflow isn't causing any issue. I just went to the line of code  in com.day.cq.dam.core.impl.cache.CQBufferedImageCache which was throwing null pointer .It was all about fetching properties of the asset.

As i was creating image nodes using jcrom api, tags property ( empty string []) was getting added which was causing the issue.

If tags property is there,we also need to have cq:taggable mixin else it throws this error.

Thanks,

Deepikaa