Read JCR content | Community
Skip to main content
Ricky99999
Level 4
Apr 27, 2020 6:17 PM UTC
Solved

Read JCR content

Hi Team, 

 

From third party we received few corrupted images to AEM and we are not able to use those images on page. 

if we open original node (under image node) in notepad it is displaying invalid session in a JSON format . I know it’s binary data .

 

Now my requirement is I need to find  all corrupted images in AEM and send back to team to retrigger.

 

how can I read the Jcr content binary data to text . 

Thanks for the support.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
akhoury
akhouryAccepted solution
Employee
Apr 28, 2020 4:48 PM UTC

Try to download the jcr:data property directly and see if the binary is corrupted or if the workflow just needs to be run again.

 

For example:

http://aemhost/content/dam/image.png/jcr:content/renditions/original/jcr:content/jcr:data 

9 replies

akhoury
akhouryAccepted solution
Employee
Apr 28, 2020 4:48 PM UTC

Try to download the jcr:data property directly and see if the binary is corrupted or if the workflow just needs to be run again.

 

For example:

http://aemhost/content/dam/image.png/jcr:content/renditions/original/jcr:content/jcr:data 

Translate
VeenaVikraman
New Participant
Apr 28, 2020 4:16 PM UTC

Can you give a sample corrupted image so that I can try replicating this in my local and see if we can read it to text or figure out any other way to find out the corrupted images? 

Note:- Please don't share any project specific images. Only share the one which can be shared ,

Translate
Dipti_Chauhan
New Participant
Apr 28, 2020 6:17 AM UTC

Hi

if you image is corrupted , that means Update asset workflow not able to create renditions.. If thats the case you can just write query to find all assets where renditions are not there..

 

Thanks

Dipti Chauhan

Translate
Ricky99999
Level 4
Apr 28, 2020 2:32 AM UTC
Nothing in error.log related to this
Translate
Ricky99999
Level 4
Apr 28, 2020 2:32 AM UTC

Nothing in error.log related to this corrupted image 

Translate
akhoury
Employee
Apr 27, 2020 9:49 PM UTC

I meant to check the actual log, not the http response, to see if the binary is missing in case you have this issue:

https://helpx.adobe.com/experience-manager/kb/oak-blobstore-inconsistency-blobId.html

 

Please send more specifics like a screenshot of the Assets UI for the corrupt images versus good ones and any other specifics that might help me in finding root cause for you.

Translate
Ricky99999
Level 4
Apr 27, 2020 6:37 PM UTC
Now is there any way to read responceStatus from the original node(under assets node)
Translate
Ricky99999
Level 4
Apr 27, 2020 6:35 PM UTC

ResponseStatus=failure, type =invalid data and error message , in json format

Translate
akhoury
Employee
Apr 27, 2020 6:21 PM UTC
For the corrupted images, when you try to access them do you see an error in the error.log? If so, then what is the error?
Translate