Pattern selector

Most relevant patterns first. Most helpful ones displayed. Click here to show all.

  1. GroovyClassLoader.parseClass() has thrown a MultipleCompilationErrorsException
    Apache Groovy
    0
    0
    0
  2. ErrorCollector.failIfErrors() has thrown a MultipleCompilationErrorsException
    Apache Groovy
    41
    67
    55

Your stack trace compared to the selected pattern

Jump to solutionsExpand frames
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, D:\work\flack\grails\es-common-mail\EsCommonMailGrailsPlugin.groovy: 193: unexpected token: } @ line 193, column 1. } ^ 1 error
    at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:296)
    at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:143)
    at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:113)
    at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:125)
14 frames hidden

Solution

Mohd Salauddin3 months ago

MultipleCompilationErrorsException due to many reasons a) If the groovy script does not identify any symbols , for example if we execute println(hello) , groovy will give the exception as it does not identify ` symbol. version (2.x) b) If we fail to load any libraries or plugins , but try to use the methods from the libraries. c) If we fail to import respective Classes which we are using. (error message unable to resolve class) d) Using Improper syntaxes , For Example Using 3.x versions sytnax in 2.x version
e) Missing Jar files

ErrorController in groovy has a method called failIfErrors , in which hasErrors() is called to check code has any errors while excution , if found MultipleCompilationErrorsException is thrown.

To avoid this Exception follow proper/respective version syntaxes, load libraries or plugins completely while using methods from them, import whatever is required from libraries before using, Have frequent hasErrors checks.

External results for this pattern (10)

  1. startup failed: WorkflowScript: Loading libraries failed 1 error
    Show stack trace
  2. alexsedovavia GitHub3 days ago
    startup failed: jmaster_1 | /var/jenkins_home/init.groovy.d/artifactory.groovy: 22: unable to resolve class CredentialsConfig jmaster_1 | @ line 22, column 23. jmaster_1 | CredentialsConfig deployerCredentials = new CredentialsConfig(getPasswordCredentials(serverConfig.deployerCredentialsId), jmaster_1 | ^ jmaster_1 | jmaster_1 | /var/jenkins_home/init.groovy.d/artifactory.groovy: 22: unable to resolve class CredentialsConfig jmaster_1 | @ line 22, column 45. jmaster_1 | sConfig deployerCredentials = new Creden jmaster_1 | ^ jmaster_1 | jmaster_1 | /var/jenkins_home/init.groovy.d/artifactory.groovy: 25: unable to resolve class CredentialsConfig jmaster_1 | @ line 25, column 23. jmaster_1 | CredentialsConfig resolverCredentials = new CredentialsConfig(getPasswordCredentials(serverConfig.deployerCredentialsId), jmaster_1 | ^ jmaster_1 | jmaster_1 | /var/jenkins_home/init.groovy.d/artifactory.groovy: 25: unable to resolve class CredentialsConfig jmaster_1 | @ line 25, column 45. jmaster_1 | sConfig resolverCredentials = new Creden jmaster_1 | ^ jmaster_1 | jmaster_1 | /var/jenkins_home/init.groovy.d/artifactory.groovy: 28: unable to resolve class ArtifactoryServer jmaster_1 | @ line 28, column 10. jmaster_1 | List<ArtifactoryServer> servers = desc.getArtifactoryServers() jmaster_1 | ^ jmaster_1 | jmaster_1 | /var/jenkins_home/init.groovy.d/artifactory.groovy: 29: unable to resolve class ArtifactoryServer jmaster_1 | @ line 29, column 23. jmaster_1 | ArtifactoryServer server = new ArtifactoryServer(serverConfig.serverName, jmaster_1 | ^ jmaster_1 | jmaster_1 | /var/jenkins_home/init.groovy.d/artifactory.groovy: 29: unable to resolve class ArtifactoryServer jmaster_1 | @ line 29, column 32. jmaster_1 | ArtifactoryServer server = new ArtifactoryServer(serverConfig.serverName, jmaster_1 | ^ jmaster_1 | jmaster_1 | 7 errors jmaster_1 |
    Show stack trace
  3. miabbottvia GitHub6 days ago
    startup failed: WorkflowScript: 72: unexpected char: '#' @ line 72, column 17. # don't sync overlay.yml symlink since it won't resolve ^ 1 error
    Show stack trace
  4. panvia Google Groups1 week ago
    startup failed: WorkflowScript: 1: unable to resolve class some.Utils @ line 1, column 1. @GrabResolver(name='Internal Nexus Snapshot', root='https://internal.nexus.com/') ^ 1 error
    Show stack trace
  5. Jesse Glickvia Jenkins JIRA1 week ago
    startup failed: WorkflowScript: 2: Ambiguous expression could be either a parameterless closure expression or an isolated open code block; solution: Add an explicit closure parameter list, e.g. {it -> ...}, or force it to be treated as an open block by giving it a label, e.g. L:{...} @ line 2, column 1. { ^ 1 error
    Show stack trace
  6. Ceesiebirdvia Stack Overflow2 months ago
    startup failed: WorkflowScript: 5: Expected to find someKey "someValue" @ line 5, column 14. node { ^ 1 error
    Show stack trace
  7. adr...@smop.co.uk (JIRA)via Google Groups2 months ago
    startup failed: WorkflowScript: 37: Missing required parameter: @ line 37, column 25. xcodeBuild( ^ WorkflowScript: 37: Missing required parameter: @ line 37, column 25. xcodeBuild( ^ 2 errors
    Show stack trace
  8. Johnvia Stack Overflow2 months ago
    startup failed: WorkflowScript: 10: Expected a stage @ line 10, column 9. lock(resource: 'myResource') { ^ WorkflowScript: 10: Stage does not have a name @ line 10, column 9. lock(resource: 'myResource') { ^ WorkflowScript: 10: Nothing to execute within stage "null" @ line 10, column 9. lock(resource: 'myResource') { ^ 3 errors
    Show stack trace
  9. startup failed: WorkflowScript: 6: unexpected token: FILE @ line 6, column 17. body: ${FILE,path="enteryPath/template.html"}, ^ 1 error
    Show stack trace
  10. liv2hakvia Stack Overflow2 months ago
    startup failed: WorkflowScript: 5: unexpected token: node @ line 5, column 2. node { ^ 1 error
    Show stack trace