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

java.lang.IllegalArgumentException: Prefix string too short org.jenkinsci.plugins.xvfb.XvfbBuildWrapper.launchXvfb(XvfbBuildWrapper.java:484)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Duplicate
    • Component/s: xvfb-plugin
    • Labels:
      None
    • Environment:
      jenkins 1.597, xvfb-plugin version 1.0.13, CentOS Linux release 7.0.1406 (Core)
    • Similar Issues:

      Description

      I get this error starting a job with "Start Xvfb before the build, and shut it down after" option active.

      ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com
      java.lang.IllegalArgumentException: Prefix string too short
      at java.io.File.createTempFile(File.java:1978)
      at hudson.FilePath$18.invoke(FilePath.java:1404)
      at hudson.FilePath$18.invoke(FilePath.java:1401)
      at hudson.FilePath.act(FilePath.java:989)
      at hudson.FilePath.act(FilePath.java:967)
      at hudson.FilePath.createTempDir(FilePath.java:1401)
      at org.jenkinsci.plugins.xvfb.XvfbBuildWrapper.launchXvfb(XvfbBuildWrapper.java:484)
      at org.jenkinsci.plugins.xvfb.XvfbBuildWrapper.setUp(XvfbBuildWrapper.java:594)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:655)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533)
      at hudson.model.Run.execute(Run.java:1718)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
      at hudson.model.ResourceController.execute(ResourceController.java:89)
      at hudson.model.Executor.run(Executor.java:240)

      I see in the code XvfbBuildWrapper.launchXvfb the build Id property is passed as prefix.

      final FilePath frameBufferDir = rootPath.createTempDir(build.getId(), "xvfb");

      The java.io.File.createTempFile throw an IllegalArgumentException if the prefix argument contains less than three characters.

      I think the build.id is a number and is less than 3 character (at least for the first 99 builds).

        Attachments

          Activity

          Hide
          zregvart zregvart added a comment -

          Thanks for reporting, Jonathan reported this issue few minutes prior (see JENKINS-26504), fix is on the way...

          Show
          zregvart zregvart added a comment - Thanks for reporting, Jonathan reported this issue few minutes prior (see JENKINS-26504 ), fix is on the way...
          Hide
          zregvart zregvart added a comment -

          Closing old issues.

          Show
          zregvart zregvart added a comment - Closing old issues.

            People

            Assignee:
            zregvart zregvart
            Reporter:
            mturra mturra
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: