FATAL: tried to access class net.bull.javamelody.Counter from class Script1
java.lang.IllegalAccessError: tried to access class net.bull.javamelody.Counter from class Script1
at Script1.run(Script1.groovy:7)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:663)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:650)
at hudson.plugins.groovy.SystemGroovy.run(SystemGroovy.java:118)
at hudson.plugins.groovy.SystemGroovy.perform(SystemGroovy.java:74)
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)
Thanks!!
--
---
You received this message because you are subscribed to the Google Groups "javamelody" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javamelody+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
import net.bull.javamelody.*;
import net.bull.javamelody.internal.model.*;
url = "http://myserver:8080/mywebapp/monitoring";
list = new RemoteCall(url).collectData();
for (object in list) {
if (object.getClass().getSimpleName().equals("Counter")) {
aggreg = new CounterRequestAggregation(object);
if (aggreg.isTimesDisplayed()) {
for (request in aggreg.getRequests()) {
if (request.getMean() >= aggreg.getSevereThreshold()
|| request.getCpuTimeMean() >= aggreg.getSevereThreshold()) {
println(request.getName()
+ " hits=" + request.getHits()
+ " mean=" + request.getMean()
+ " max=" + request.getMaximum()
+ " stddev=" + request.getStandardDeviation()
+ " cpuTimeMean=" + request.getCpuTimeMean()
+ " systemErrorPercentage=" + request.getSystemErrorPercentage());
}
}
}
}
}Thanks a lot for your response. I created a Jenkins jobs and ran the groovy script above. Below is the error log. I am using the Jenkins monitoring plugin ( version 1.65.1)FATAL: tried to access class net.bull.javamelody.Counter from class Script1
java.lang.IllegalAccessError: tried to access class net.bull.javamelody.Counter from class Script1
at Script1.run(Script1.groovy:7)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:663)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:650)
at hudson.plugins.groovy.SystemGroovy.run(SystemGroovy.java:118)
at hudson.plugins.groovy.SystemGroovy.perform(SystemGroovy.java:74)
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)
Thanks!!