org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script1.groovy: 2: Ambiguous expression could be a parameterless closure expression, an isolated open code block, or it may continue a previous statement; solution: Add an explicit parameter list, e.g. {it -> ...}, or force it to be treated as an open block by giving it a label, e.g. L:{...}, and also either remove the previous newline, or add an explicit semicolon ';' @ line 2, column 13. { it.getRoleName() in ['ROLE_ADMINISTRATOR','ROLE_SALES_MANAGER'] } I am trying to add security file in a domain and create a adhoc report.