Expand my Community achievements bar.

Join expert-led, customer-led sessions on Adobe Experience Manager Assets on August 20th at our Skill Exchange.

Getting null from com.adobe.granite (Repository) consistencyCheck(java.lang.String rootNode, java.lang.Boolean fixInconsistencies)

Avatar

Level 1
Hi, I am working with AEM 6.5, and I am attempting to run the com.adobe.granite (Repository) consistency check with the root "/" and have set "fix inconsistencies" to "false". However, the response immediately displays: (null). I also tried running it from http://localhost:4502/system/console/repositorycheck, but I don't see any errors in the response, even though I can see the number of traversed nodes. How can I intentionally corrupt a node so that I can see some results via the com.adobe.granite (Repository) consistency check as a test? Additionally, could I use it as an MBean in Java to perform a weekly repository consistency check?
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

3 Replies

Avatar

Level 4

Try removing the jcr node, we found a git repo with groovy script that does the job. 
The Oak version should match with your AEM Oak.

java -jar oak-run-<version>.jar console crx-quickstart/repository/segmentstore
:load https://gist.githubusercontent.com/stillalex/e7067bcb86c89bef66c8/raw/d7a5a9b839c3bb0ae5840252022f871fd38374d3/childCount.groovy
countNodes(session.workingNode, true)

 Remove the jcr node of one of the existing path in your repo

java -jar oak-run-<version>.jar console crx-quickstart/repository/segmentstore:load https://gist.githubusercontent.com/stillalex/43c49af065e3dd1fd5bf/raw/9e726a59f75b46e7b474f7ac763b0888d5a3f0c3/rmNode.groovy
rmNode(session, "/content/dam/…/jcr:content")

 

Now start your AEM, and your http://localhost:4502/system/console/repositorycheck, should show inconsistency.

 

Thanks,

 

Kind regards,

Kiran Buthpur

Avatar

Level 1

Hi @ButhpurKiran ,
I have successfully removed jcr:content but I still don't see any errors in http://localhost:4502/system/console/repositorycheck
My AEM was off while I was removing the jcr node. I also need to add --read-write in the second command because, without it, my repository is connected in read-only mode, and deletion operations can't be performed in that mode: 
java -jar oak-run-<version>.jar console --read-write crx-quickstart/repository/segmentstore:load https://gist.githubusercontent.com/stillalex/43c49af065e3dd1fd5bf/raw/9e726a59f75b46e7b474f7ac763b08...
rmNode(session, "/content/dam/…/jcr:content")

Avatar

Administrator

@StefanNi1 Just checking in — were you able to resolve your issue?
We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it — your insights could really benefit the community. Thanks again for being part of the conversation!



Kautuk Sahni