groovy.lang.MissingMethodException
Has anyone run into the issue, when attempting to run a Groovy script in the "generic" script console?
I am trying to run what I assume is a valid script (I got it from https://hashimkhan.in/aem-adobecq5-code-templates/groovy-script/ )
The script is:
import javax.jcr.Node
noOfPages = 0
path = '/content/dam/we-retail/en/products/apparel/'
findAllPages()
def findAllPages() {
getPage(path).recurse {
page ->
println 'Title:' + page.title
println 'Path:' + page.path
noOfPages++
}
}
The error I receive is:
groovy.lang.MissingMethodException: No signature of method: org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.getPage()
Has anyone run into this?
Thanks in advance,
Glenn