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

NullPointer after upgrading to 1.6

    Details

    • Similar Issues:

      Description

      After upgrading to 1.6, when my Grails jobs run, I get a NPE:

      java.lang.NullPointerException
      	at com.g2one.hudson.grails.GrailsBuilder.perform(GrailsBuilder.java:155)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:710)
      	at hudson.model.Build$RunnerImpl.build(Build.java:178)
      	at hudson.model.Build$RunnerImpl.doRun(Build.java:139)
      	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:480)
      	at hudson.model.Run.run(Run.java:1434)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:239)
      

      I save my job after opening it up and saving it without changing, it now works. The config file now has an empty: useWrapper element. Your plugin should probably handle it missing without having to resave all grails jobs.

        Attachments

          Activity

          Hide
          kiy0taka kiy0taka added a comment -

          If you want to fix this problem now, please run script via Script Console (http://yourjenkins/script).

          import hudson.model.*
          import com.g2one.hudson.grails.GrailsBuilder
          
          Hudson.instance.items.each { item ->
              item.builders.findAll { it in GrailsBuilder && it.useWrapper == null } .each {
                  it.useWrapper = false
                  item.save()
              }
          }
          
          Show
          kiy0taka kiy0taka added a comment - If you want to fix this problem now, please run script via Script Console ( http://yourjenkins/script ). import hudson.model.* import com.g2one.hudson.grails.GrailsBuilder Hudson.instance.items.each { item -> item.builders.findAll { it in GrailsBuilder && it.useWrapper == null } .each { it.useWrapper = false item.save() } }
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: kiy0taka
          Path:
          src/main/java/com/g2one/hudson/grails/GrailsBuilder.java
          http://jenkins-ci.org/commit/grails-plugin/9236327cd1096b6ca821270fdd7ee931a44c8efb
          Log:
          fix bug. refs JENKINS-13813

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: kiy0taka Path: src/main/java/com/g2one/hudson/grails/GrailsBuilder.java http://jenkins-ci.org/commit/grails-plugin/9236327cd1096b6ca821270fdd7ee931a44c8efb Log: fix bug. refs JENKINS-13813

            People

            • Assignee:
              kiy0taka kiy0taka
              Reporter:
              lshatzer Larry Shatzer, Jr.
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: