【问题标题】:Jenkins TFS plugin throws NumberFormatExceptionJenkins TFS 插件抛出 NumberFormatException
【发布时间】:2019-12-29 01:34:19
【问题描述】:

当我使用 Jenkins TFS 插件从 Visual Studio Online 进行投票时,我收到以下消息和异常。

我在 Ubuntu 12.10 上使用 TEE-CLC。

No history entries were found for the item and version combination specified.
FATAL: For input string: "" 
java.lang.NumberFormatException: For input string: "" 
at java.lang.NumberFormatException.forInputString(Unknown Source) 
at java.lang.Integer.parseInt(Unknown Source) 
at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:200)
at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:214)
at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:189)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1415) 
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561)
at hudson.model.Run.execute(Run.java:1678) 
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 
at hudson.model.ResourceController.execute(ResourceController.java:88) 
at hudson.model.Executor.run(Executor.java:231)

有人知道该怎么办吗?

【问题讨论】:

    标签: tfs jenkins jenkins-plugins


    【解决方案1】:

    互联网上其他地方的答案表明这是由于缺乏特定的工作空间或凭据。

    如果之前的命令有效,那么很可能是由于本地工作区中缺少修订。这可能是由于用户缺乏对这些内容的读取权限造成的。

    对我来说,相当荒谬的是,它是由 Jenkins 主机上不正确的服务器时钟(过去设置)引起的,这导致之前的“获取”命令在当前服务器时间之前请求修订;这实际上早于任何代码提交到特定位置的时间。

    【讨论】:

      【解决方案2】:

      您可能需要仔细检查项目路径 TFS url 是否存在任何可能的拼写错误。我在路径中有拼写错误,导致了同样的异常。

      【讨论】:

        【解决方案3】:

        我还想看看 TFS 项目名称中的任何空格是如何出现在日志中的。在我日志的这一行中:

        [MySlaveJob02] $ tf history "$/PONTIAC RDSDSMyProject_Name" -recursive -stopafter:1 -noprompt -version:D2015-03-07T19:31:42Z -format:brief ********
        

        这个空间是可见的,其他时候它不工作时,它是一个 %20

        【讨论】:

          猜你喜欢
          • 2018-10-04
          • 1970-01-01
          • 2013-03-29
          • 2020-06-12
          • 1970-01-01
          • 1970-01-01
          • 2013-03-06
          • 1970-01-01
          • 2012-11-25
          相关资源
          最近更新 更多