哈德逊|加载作业时出现 NullPointerException
我们使用的是 hudson 2.0.0 版本。 重新启动 hudson 几天后,我发现一些工作丢失了。 发现是由于以下NPE造成的。
Dec 9, 2011 11:39:34 AM hudson.model.Hudson$5 onTaskFailed
SEVERE: Failed Loading job ABC
java.lang.NullPointerException
at hudson.model.Project.createTransientActions(Project.java:206)
at hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:627)
at hudson.model.AbstractProject.onLoad(AbstractProject.java:287)
at hudson.model.Project.onLoad(Project.java:87)
at hudson.model.Items.load(Items.java:109)
at hudson.model.Hudson$13.run(Hudson.java:2376)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
at hudson.model.Hudson$4.runTask(Hudson.java:707)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTaskThreadPoolExecutor.java
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
升级到 2.1.2 没有帮助。我删除了所有插件并重新安装,但没有成功。 还有其他人遇到过这个吗?
谢谢,
加亚斯里
We are using hudson version 2.0.0.
Few days back after restarting hudson, i found that some of the jobs were missing.
Found that its due to the following NPE.
Dec 9, 2011 11:39:34 AM hudson.model.Hudson$5 onTaskFailed
SEVERE: Failed Loading job ABC
java.lang.NullPointerException
at hudson.model.Project.createTransientActions(Project.java:206)
at hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:627)
at hudson.model.AbstractProject.onLoad(AbstractProject.java:287)
at hudson.model.Project.onLoad(Project.java:87)
at hudson.model.Items.load(Items.java:109)
at hudson.model.Hudson$13.run(Hudson.java:2376)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
at hudson.model.Hudson$4.runTask(Hudson.java:707)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTaskThreadPoolExecutor.java
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Upgrading to 2.1.2 didnt help. I removed all the plugins and re-installed, but in vain.
Has anybody else faced this?
Thanks,
Gayathri
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好的,我发现了问题。
要解决此问题,我必须添加包含的行对于无法加载的项目中的每个 config.xml 文件(接近 XML 文件的末尾):
不知怎的,如果没有这个,Hudson/Jenkins 会呕吐并躲在角落里哭泣。
OK I found the problem.
To fix this issue, I had to add the line that contains <publishers/> to each config.xml file in projects that failed to load (towards the end of XML file):
Somehow without this, Hudson/Jenkins barfs and hides in the corner crying.
当 config.xml 中存在解析错误时,仪表板中的作业将会丢失。
您可以在 Hudson / Manage Hudson / System Log 中检查这些错误,查找
Itmeans the autoparameter migration failed and you必须手动编辑 Jobs 根目录中的 config.xml,debug 信息在日志提供有问题的行号。注释掉该项目通常是有效的。有时需要手动重新配置。
当 build/中未生成文件 build.xml 时,作业将从重新启动之间的历史记录中丢失。目录。如果任何插件出现异常,可能会导致该文件的创建被跳过,并且重启后不会在历史记录中显示。再次使用 Hudson / Manage Hudson / System Log 查看日志是找到有问题的插件的最快方法。禁用通常可以解决问题。
请注意,搜索“Missing Hudson Builds”将指向许多不同的插件/版本,这些插件/版本都会导致此问题。您应该查看您的日志以查找导致您的安装出现问题的原因,并且仅禁用导致您的问题的插件。
有关“无法生成 build.xml”的警告将节省大量时间。我应该对此打开一个错误。
Jobs will go missing from the dashboard when there is a parse error in the config.xml.
You can inspect these errors in Hudson / Manage Hudson / System Log looking for
It means the auto parameter migration failed and you have to edit the config.xml in the Jobs root by hand, the debug information in the log provides the offending line number. Commenting out the item usually works. Sometimes manual reconfiguring is needed.
Jobs will go missing from the history between restarts when the file build.xml is not generated in the build/<jobref> directory. If there is an exception in any plugin, it may cause the creation of this file to be skipped, and it will not show in history after a restart. Again looking in the log using Hudson / Manage Hudson / System Log is the quickest way to find the offending plugin. Disabling usually resolves the problem.
Please note that searching for "Missing Hudson Builds" will point to many different plugins/versions that all cause this problem. You should look in YOUR log to find what is causing the problem in YOUR installation, and only disabling the plugin that is causing YOUR problem.
A warning about "failed to generate build.xml" would save a lot of hours. I should open a bug on that.