That means that your oak version in aem does not match the oak-run you're using to find the last revision.
In my case I had to use the 1.2.18.
full instructions.
1. Download oak-run jar file from here http://repo1.maven.org/maven2/org/apache/jackrabbit/oak-run/
* AEM6.1 - Download the oak-run 1.2.x version matching what is installed (check via /system/console/bundles UI)
2. Stop AEM/Oak
3. Run this command:
java -jar oak-run-*.jar check -d1 --bin=-1 -p crx-quickstart/repository/segmentstore/
it which will search backwards through the revisions until it finds a consistent one:
14:00:30.783 [main] INFO o.a.j.o.p.s.f.t.ConsistencyChecker - Found latest good revision afdb922d-ba53-4a1b-aa1b-1cb044b535cf:234880
4. Revert the repository to this revision by editing ./crx-quickstart/repository/segmentstore/journal.log. Delete all lines after the line containing the latest good revision.
If you would like to find out what date and time you are reverting the repository to then run this command in the segmentstore folder (replace afdb922d-ba53-4a1b-aa1b-1cb044b535cf with the latest good revision in your journal.log):
find . -type f -name "data*.tar" -exec sh -c "tar -tvf {} |grep afdb922d-ba53-4a1b-aa1b-1cb044b535cf" \; -print
The output would show you an approximate date and time of that revision.
5. Remove all ./crx-quickstart/repository/segmentstore/*.bak files.
6. Run checkpoint clean-up to remove orphaned checkpoints:
java -jar oak-run-*.jar checkpoints ./crx-quickstart/repository/segmentstore rm-unreferenced
7. Finally compact the repository:
java -jar oak-run-*.jar compact ./crx-quickstart/repository/segmentstore/
Best regards,
Tiago