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

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Blocker Blocker
    • xvfb-plugin
    • None
    • jenkins 1.597, xvfb-plugin version 1.0.13, CentOS Linux release 7.0.1406 (Core)

      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).

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

              Created:
              Updated:
              Resolved: