我有四个虚拟服务器,它们都是从原始系统克隆的。我在所有四个上都安装了 javamelody,但在其中两个上,图表没有出现在监控页面中。其他图像显示正常。我在两台无法正常工作的服务器上收到以下错误。
我找到了要添加的建议:-Djava.awt.headless=true 但是两个正常工作的服务器没有这个。有什么建议么?
这是错误的堆栈跟踪:
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1135)
at org.jrobin.graph.ImageWorker.resize(Unknown Source)
at org.jrobin.graph.ImageWorker.<init>(Unknown Source)
at org.jrobin.graph.RrdGraph.<init>(Unknown Source)
at net.bull.javamelody.JRobin.graph(JRobin.java:217)
at net.bull.javamelody.MonitoringController.doGraph(MonitoringController.java:342)
at net.bull.javamelody.MonitoringController.doReport(MonitoringController.java:168)
at net.bull.javamelody.MonitoringController.doActionIfNeededAndReport(MonitoringController.java:141)
at net.bull.javamelody.MonitoringFilter.doMonitoring(MonitoringFilter.java:340)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:170)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)`