Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-17933

Errors in GroovyInitScript can halt startup

    Details

    • Similar Issues:

      Description

      A type etc. in init.groovy can halt startup, which seems excessive:

      org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException
      	at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:246)
      	at jenkins.InitReactorRunner.run(InitReactorRunner.java:43)
      	at jenkins.model.Jenkins.executeReactor(Jenkins.java:899)
      	at jenkins.model.Jenkins.<init>(Jenkins.java:804)
      	at hudson.model.Hudson.<init>(Hudson.java:81)
      	at hudson.model.Hudson.<init>(Hudson.java:77)
      	at hudson.WebAppMain$2.run(WebAppMain.java:217)
      Caused by: java.lang.Error: java.lang.reflect.InvocationTargetException
      	at hudson.init.InitializerFinder.invoke(InitializerFinder.java:124)
      	at hudson.init.InitializerFinder$TaskImpl.run(InitializerFinder.java:184)
      	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
      	at jenkins.model.Jenkins$7.runTask(Jenkins.java:888)
      	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at hudson.init.InitializerFinder.invoke(InitializerFinder.java:120)
      	... 8 more
      Caused by: groovy.lang.MissingPropertyException: No such property: WhateverClass for class: init
      	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50)
      	at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231)
      	at init.run(init.groovy:23)
      	at groovy.lang.GroovyShell.evaluate(GroovyShell.java:580)
      	at hudson.init.impl.GroovyInitScript.execute(GroovyInitScript.java:83)
      	at hudson.init.impl.GroovyInitScript.execute(GroovyInitScript.java:78)
      	at hudson.init.impl.GroovyInitScript.init(GroovyInitScript.java:57)
      	... 13 more
      

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/java/hudson/init/impl/GroovyInitScript.java
          test/src/test/java/hudson/init/impl/GroovyInitScriptTest.java
          test/src/test/resources/hudson/init/impl/GroovyInitScriptTest/errorsHandled.zip
          http://jenkins-ci.org/commit/jenkins/688420177afa64deb4adc9b4b92eede221cad884
          Log:
          [FIXED JENKINS-17933] Catch errors in init.groovy.

          Compare: https://github.com/jenkinsci/jenkins/compare/a4bd40d3da82...688420177afa

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/init/impl/GroovyInitScript.java test/src/test/java/hudson/init/impl/GroovyInitScriptTest.java test/src/test/resources/hudson/init/impl/GroovyInitScriptTest/errorsHandled.zip http://jenkins-ci.org/commit/jenkins/688420177afa64deb4adc9b4b92eede221cad884 Log: [FIXED JENKINS-17933] Catch errors in init.groovy. Compare: https://github.com/jenkinsci/jenkins/compare/a4bd40d3da82...688420177afa

            People

            • Assignee:
              jglick Jesse Glick
              Reporter:
              jglick Jesse Glick
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: