Jenkins TFS plugin throws NumberFormatException

╄→尐↘猪︶ㄣ 提交于 2021-01-27 20:32:26

问题


When I do a poll from Visual Studio Online using the Jenkin TFS Plugin I get the following message and exception.

I use TEE-CLC on Ubuntu 12.10.

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)

Does anyone know what to do about it?


回答1:


Elsewhere on the internet answers suggest it's due to a lack of a specific workspace or credentials.

If the previous commands have worked, then is most likely due to a lack of revisions pulled into the local workspace. This may have been caused by the user's lack of read permissions for these.

For me, rather ridiculously it was caused by an incorrect sever clock (set in the past) on the the Jenkins host this caused the previous 'get' command to request revisions before the current server time; which was actually earlier than any code commits to the specific location.




回答2:


You may want to double check project path TFS url for any possible spelling mistakes. I had a spelling mistake in the path, caused the same exception.




回答3:


I would also to see how any spaces in the TFS project name come through in the log. In this line in my log:

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

The space is visible, other times when it wasn't working, it was a %20



来源:https://stackoverflow.com/questions/21278265/jenkins-tfs-plugin-throws-numberformatexception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!