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

xshell: java.lang.NullPointerException from regex after updating to version 0.9

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • xshell-plugin
    • None
    • OS X 10.8.5 and Debian Wheezy and Windows, XShell 0.9, Jenkins 1.509.4 and Jenkins 1.532.1 and Jenkins 1.540

      I updated Jenkins to 1.540 and XShell to 0.9. Whenever I do a build I get an exception:

      Started by upstream project "MyProject" build number 560
      originally caused by:
      Started by user Kevin Wojniak
      Building on master in workspace <http://127.0.0.1:8080/job/MyProject/myproject=master/ws/>
      Fetching changes from the remote Git repository
      Fetching upstream changes from ssh://user@server/git/MyProject
      Checking out Revision fb1f25fe51ea374f732147c9dd2fef328e1b805c (origin/master)
      Cleaning workspace
      Resetting working tree
      FATAL: null
      java.lang.NullPointerException
      at java.util.regex.Pattern.<init>(Pattern.java:1132)
      at java.util.regex.Pattern.compile(Pattern.java:823)
      at hudson.plugins.xshell.XShellBuilder.perform(XShellBuilder.java:122)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
      at hudson.model.Build$BuildExecution.build(Build.java:199)
      at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:566)
      at hudson.model.Run.execute(Run.java:1679)
      at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:230)

      If I downgrade to 0.8 it works fine again.

          [JENKINS-20660] xshell: java.lang.NullPointerException from regex after updating to version 0.9

          Mark Waite added a comment -

          I encountered the same problem. The work around I used was to open the job definition, then save that job definition. It appears that the latest changes to the XShell plugin do not handle updates from a previously defined job as smoothly as they should.

          The same problem does not occur for a newly defined job, only for a job which was defined with an earlier version of the XShell plugin.

          Mark Waite added a comment - I encountered the same problem. The work around I used was to open the job definition, then save that job definition. It appears that the latest changes to the XShell plugin do not handle updates from a previously defined job as smoothly as they should. The same problem does not occur for a newly defined job, only for a job which was defined with an earlier version of the XShell plugin.

          Mark Waite added a comment -

          I submitted a pull request to fix this - https://github.com/jenkinsci/xshell-plugin/pull/10

          Mark Waite added a comment - I submitted a pull request to fix this - https://github.com/jenkinsci/xshell-plugin/pull/10

          Code changed in jenkins
          User: Mark Waite
          Path:
          pom.xml
          src/test/java/hudson/plugins/xshell/UpgradeTest.java
          http://jenkins-ci.org/commit/xshell-plugin/89b6e510450c4b03715cfe1023116fd91a0209bc
          Log:
          Test to verify JENKINS-20660 exists in current code

          The test is not an exact duplication of the error scenario, but is close
          enough to show the problem is resolved. Exact duplication would require
          that a job be defined without a RegExToKill defined, then that job would
          need to be executed in a Jenkins instance with the new plugin.

          Adds dependency on JUnit 4.11 and Hamcrest, modeled after the same
          technique used in Jenkins core and in plugins like the Git plugin.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: pom.xml src/test/java/hudson/plugins/xshell/UpgradeTest.java http://jenkins-ci.org/commit/xshell-plugin/89b6e510450c4b03715cfe1023116fd91a0209bc Log: Test to verify JENKINS-20660 exists in current code The test is not an exact duplication of the error scenario, but is close enough to show the problem is resolved. Exact duplication would require that a job be defined without a RegExToKill defined, then that job would need to be executed in a Jenkins instance with the new plugin. Adds dependency on JUnit 4.11 and Hamcrest, modeled after the same technique used in Jenkins core and in plugins like the Git plugin.

          Code changed in jenkins
          User: Mark Waite
          Path:
          src/main/java/hudson/plugins/xshell/XShellBuilder.java
          http://jenkins-ci.org/commit/xshell-plugin/8899ad4a7029753f48a671c83b4d6378676ca040
          Log:
          Fix JENKINS-20660 - null pointer exception on first run after upgrade 0.8 to 0.9

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: src/main/java/hudson/plugins/xshell/XShellBuilder.java http://jenkins-ci.org/commit/xshell-plugin/8899ad4a7029753f48a671c83b4d6378676ca040 Log: Fix JENKINS-20660 - null pointer exception on first run after upgrade 0.8 to 0.9

          Code changed in jenkins
          User: Marco Ambu
          Path:
          pom.xml
          src/main/java/hudson/plugins/xshell/XShellBuilder.java
          src/test/java/hudson/plugins/xshell/UpgradeTest.java
          http://jenkins-ci.org/commit/xshell-plugin/5fa0853a8603a2756475640806fc5ab73f924b87
          Log:
          Merge pull request #11 from MarkEWaite/JENKINS-20660

          Fix JENKINS-20660 - null pointer exception on first run after upgrade 0.8 to 0.9

          Compare: https://github.com/jenkinsci/xshell-plugin/compare/87601f90ec1d...5fa0853a8603

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Marco Ambu Path: pom.xml src/main/java/hudson/plugins/xshell/XShellBuilder.java src/test/java/hudson/plugins/xshell/UpgradeTest.java http://jenkins-ci.org/commit/xshell-plugin/5fa0853a8603a2756475640806fc5ab73f924b87 Log: Merge pull request #11 from MarkEWaite/ JENKINS-20660 Fix JENKINS-20660 - null pointer exception on first run after upgrade 0.8 to 0.9 Compare: https://github.com/jenkinsci/xshell-plugin/compare/87601f90ec1d...5fa0853a8603

          Mark Waite added a comment -

          Version 0.10 of the XShell plugin will include this fix

          Mark Waite added a comment - Version 0.10 of the XShell plugin will include this fix

            Unassigned Unassigned
            kainjow Kevin Wojniak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: