java.lang.NoClassDefFoundError:无法初始化类hudson.util.ProcessTree $ UnixReflection [英] java.lang.NoClassDefFoundError: Could not initialize class hudson.util.ProcessTree$UnixReflection

查看:453
本文介绍了java.lang.NoClassDefFoundError:无法初始化类hudson.util.ProcessTree $ UnixReflection的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用Jenkins构建项目时遇到此问题: java.lang.NoClassDefFoundError:无法初始化类hudson.util.ProcessTree $ UnixReflection.

I am having this problem when trying to build my project with Jenkins: java.lang.NoClassDefFoundError: Could not initialize class hudson.util.ProcessTree$UnixReflection.

java.lang.NoClassDefFoundError: Could not initialize class hudson.util.ProcessTree$UnixReflection
at hudson.util.ProcessTree$Unix.get(ProcessTree.java:506)
at hudson.util.ProcessTree.killAll(ProcessTree.java:144)
at hudson.Proc$LocalProc.destroy(Proc.java:380)
at hudson.Proc$LocalProc.join(Proc.java:353)
at hudson.tasks.CommandInterpreter.join(CommandInterpreter.java:155)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.Build$BuildExecution.build(Build.java:206)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1728)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:405)

我曾尝试将JAVA JDK 1.8降级到1.7,但仍无法解决问题.

I have tried to downgrade from JAVA JDK 1.8 to 1.7 but still not resolving the problem.

这是一个JavaScript项目,测试通过,但是由于该错误而导致构建失败.

This is a JavaScript project, the test are passing but build failed because of that error.

你能帮我吗?

推荐答案

我们通过减少jenkins stdout/stderr输出来解决此问题.只需将调用的命令的输出重定向到文件,然后重试即可.

We fixed it by reducing jenkins stdout/stderr output. Just redirect called commands' output to files and try again.

在Jenkins团队对其进行修复之前,这只是一种解决方法,但对我们来说效果很好.

It is just a workaround until Jenkins team fix it but it works pretty well for us.

这篇关于java.lang.NoClassDefFoundError:无法初始化类hudson.util.ProcessTree $ UnixReflection的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆