chetanmeh / oak-console-scripts

Miscellaneous scripts to be run via oak-run for AEM or Oak based setups
Apache License 2.0
10 stars 7 forks source link

Load url is not correct #4

Open hibiki-kamioka opened 3 years ago

hibiki-kamioka commented 3 years ago

Hi @chetanmeh , I believe that Load url is not correct in README.md. The correct load url is as follows. Is my understanding is correct?

java -jar oak-run*.jar console /path/to/segmentstore ":load https://raw.githubusercontent.com/chetanmeh/oak-console-scripts/master/src/main/groovy/index/checkIndexConsistency.groovy"

Also I executed the above command however I got two errors. Could you please confirm it and let me know how to resolve these errors.

Thanks,

Invalid import definition: 'org.apache.jackrabbit.oak.plugins.tree.RootFactory'; reason: startup failed:
script16271174369372107038065.groovy: 1: unable to resolve class org.apache.jackrabbit.oak.plugins.tree.RootFactory
 @ line 1, column 1.
   import org.apache.jackrabbit.oak.plugins.tree.RootFactory
   ^

1 error

Invalid import definition: 'org.apache.jackrabbit.oak.plugins.tree.TreeFactory'; reason: startup failed:
script16271174370481318420307.groovy: 1: unable to resolve class org.apache.jackrabbit.oak.plugins.tree.TreeFactory
 @ line 1, column 1.
   import org.apache.jackrabbit.oak.plugins.tree.TreeFactory
   ^

1 error

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
groovysh_evaluate: 12: [Static type checking] - The variable [RootFactory] is undeclared.
 @ line 12, column 21.
           Root root = RootFactory.createReadOnlyRoot(nodeStore.root)
                       ^

groovysh_evaluate: 91: [Static type checking] - The variable [TreeFactory] is undeclared.
 @ line 91, column 33.
               Tree nodeTypeTree = TreeFactory.createReadOnlyTree(nodeType)
                                   ^

2 errors