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

xshell: java.lang.StringIndexOutOfBoundsException: String index out of range: 1

    Details

    • Similar Issues:

      Description

      I did not see the xshell component listed, so I used `plugin`.

      The command configured in the xshell was very simple: python subdir/some.py

      FATAL: String index out of range: 1
      java.lang.StringIndexOutOfBoundsException: String index out of range: 1
      at java.lang.String.charAt(String.java:686)
      at java.util.regex.Matcher.appendReplacement(Matcher.java:703)
      at java.util.regex.Matcher.replaceAll(Matcher.java:813)
      at java.lang.String.replaceAll(String.java:2189)
      at hudson.plugins.xshell.XShellBuilder.perform(XShellBuilder.java:70)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601)
      at hudson.model.Build$RunnerImpl.build(Build.java:174)
      at hudson.model.Build$RunnerImpl.doRun(Build.java:138)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
      at hudson.model.Run.run(Run.java:1273)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:129)

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : mambu
          Path:
          trunk/hudson/plugins/xshell/src/main/java/hudson/plugins/xshell/XShellBuilder.java
          http://jenkins-ci.org/commit/35086
          Log:
          [xshell] Modified regex for replacing path separators [FIXED JENKINS-7538].

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mambu Path: trunk/hudson/plugins/xshell/src/main/java/hudson/plugins/xshell/XShellBuilder.java http://jenkins-ci.org/commit/35086 Log: [xshell] Modified regex for replacing path separators [FIXED JENKINS-7538] .
          Hide
          mambu Marco Ambu added a comment -

          I have reproduced this bug and fixed. If anybody can try the latest development it would be better before making a new release.

          Show
          mambu Marco Ambu added a comment - I have reproduced this bug and fixed. If anybody can try the latest development it would be better before making a new release.
          Hide
          ssbarnea Sorin Sbarnea added a comment -

          Please provide a link to the jar file and I will test it.

          Show
          ssbarnea Sorin Sbarnea added a comment - Please provide a link to the jar file and I will test it.
          Hide
          mambu Marco Ambu added a comment -

          xshell 0.4 development version (for testing only)

          Show
          mambu Marco Ambu added a comment - xshell 0.4 development version (for testing only)
          Hide
          ssbarnea Sorin Sbarnea added a comment -

          Works, thanks that was really quick. Also, it would be helpful to improve the documentation a little bit. For example I dont know if I can run `set` with xshell and how do I access the environment variables in it, or how can I detect if a command failed (exit code) and force an exit (preventing from running the next command in the xshell).

          Also thanks again!

          Show
          ssbarnea Sorin Sbarnea added a comment - Works, thanks that was really quick. Also, it would be helpful to improve the documentation a little bit. For example I dont know if I can run `set` with xshell and how do I access the environment variables in it, or how can I detect if a command failed (exit code) and force an exit (preventing from running the next command in the xshell). Also thanks again!

            People

            • Assignee:
              mambu Marco Ambu
              Reporter:
              ssbarnea Sorin Sbarnea
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: