mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 05:22:22 +00:00
[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.
This commit is contained in:
1 parent
ed6678029d
commit
bcdfb2860f
2 files changed
+15
-7
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user