提交 bcdfb286 编写于 作者: J Jesse Glick

[FIXED JENKINS-15796] NoClassDefFoundError: 'Could not initialize class...

[FIXED JENKINS-15796] NoClassDefFoundError: 'Could not initialize class org.jvnet.hudson.Windows$MEMORYSTATUSEX' from SwapSpaceMonitor.
Not fixing actual linkage error—JNA issue of some kind—but ensuring that Jenkins reports it only once.
上级 ed667802
......@@ -64,6 +64,9 @@ Upcoming changes</a>
<li class=bug>
Preview function for textareas using Jenkins markup did not work when CSRF protection was enabled.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-17085">issue 17085</a>)
<li class=bug>
JNA-related error from Windows slave monitoring thrown repeatedly.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-15796">issue 15796</a>)
<li class=rfe>
Improved the request handling performance (where the file lookup is expensive, such as NFS.)
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-16606">issue 16606</a>)
......
......@@ -102,17 +102,22 @@ public class SwapSpaceMonitor extends NodeMonitor {
try {
mm = MemoryMonitor.get();
} catch (IOException e) {
if(!warned) {
// report the problem just once, and avoid filling up the log with the same error. see HUDSON-2194.
warned = true;
throw e;
} else {
return null;
}
return report(e);
} catch (LinkageError e) { // JENKINS-15796
return report(e);
}
return new MemoryUsage2(mm.monitor());
}
private <T extends Throwable> MemoryUsage report(T e) throws T {
if (!warned) {
warned = true;
throw e;
} else { // JENKINS-2194
return null;
}
}
private static final long serialVersionUID = 1L;
private static boolean warned = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册