`
kavy
  • 浏览: 891395 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Could not initialize class org.jfree.chart.JFreeChart

    博客分类:
  • web
 
阅读更多

On linux servers:Could not initialize class org.jfree.chart.JFreeChart

On linux servers, some people have reported a problem after a successful install, once their server is in use. They report that Web-CAT produces unexpected exceptions when you visit any pages that contain charts, such as those graphing student results. The Web-CAT exception page cites the following Java exception:

Error: java.lang.NoClassDefFoundError
Reason: Could not initialize class org.jfree.chart.JFreeChart

Or possibly:

Error: java.lang.NoClassDefFoundError
Reason: Could not initialize class sun.awt.X11GraphicsEnvironment

If this occurs, check the environment variables for the pseudo-user under which Tomcat is running. Check for any definition for the DISPLAY environment variable that is visible to Tomcat, an remove any such definitions.

This problem appears to be caused internally in Sun's AWT implementation, where Java is trying to connect to the X11 display identified by the DISPLAY environment variable, but the user id under which Tomcat is running does not have permission to connect (or there is no active DISPLAY). Removing the environment variable setting for the Tomcat user will fix this problem. You may also need to add -Djava.awt.headless=true to Tomcat's startup arguments as well.

 

eq:

 I did a ps -ef | grep headless command to look at how tomcat was started and I found that this was passed in instead (with an extra ? on the end):

-Djava.awt.headless=true?

if don't have it,we should:

export  CATALINA_OPTS="-Djava.awt.headless=true" 

分享到:
评论

相关推荐

    Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser

    标题 "Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser" 提示了一个Java运行时错误,这通常意味着在尝试加载或初始化`JRStyledTextParser`类时遇到了问题。`JRStyledTextParser`是...

    解决hbase client在windows环境下报NoClassDefFound问题

    解决hbase client在windows环境下报Could not initialize class org.fusesource.jansi.internal.Kernel32的问题,把jar包放入hbase client的lib包下,重新运行hbase.cmd shell即可

    derby.jar 。。

    java.lang.NoClassDefFoundError: Could not initialize class org.apache.derby.jdbc.AutoloadedDriver40 导致的原因: 在azkaban的server和executor中缺少一个叫derby.jar的包

    java串口所需依赖dll文件合集

    监听COM口启动程序报错 Could not initialize class gnu.io.RXTXCommDriver异常 是因为需要在%JAVA_HOME%/jre/bin目录中添加rxtxParallel.dll、rxtxSerial.dll文件

    linux上实现视频截图

    public class VideoScreenshot { public static void main(String[] args) { String videoFilePath = "/path/to/your/video"; String screenshotPath = "/path/to/screenshot.png"; // 打开视频文件 avformat....

    jacob_1.14.3.rar

    内涵jacob_1.14.3-x64.dll;jacob_1.14.3-64.jdk(maven地址);解决方法:Could not initialize class com.jacob.com.ComThread

    ezmorph-1.0.6.jar

    缺少这个包可能导致Could not initialize class net.sf.json.JsonConfig 使用json时候将会用到的一个jar包,发现这个包在网上提供的比较少.缺少这个包可能导致Could not initialize class net.sf.json.JsonConfig ...

    gnu.io.rar_android_gnu.io _librxtxSerial_librxtxSerial._librxtxS

    在Android平台上进行串口通信开发时,常常会遇到需要与硬件设备进行低级别交互的情况,例如读写传感器数据、控制外部设备等。标题中的“gnu.io.rar_android_gnu.io _librxtxSerial_librxtxSerial._librxtxS”提到了`...

    Plsql 12连接Oracle时出现Could not initialize oci.dll解决方案 oracle 客户端

    在使用PL/SQL Developer 12连接Oracle数据库时,可能会遇到“Could not initialize oci.dll”这样的错误提示。这个错误通常表明系统无法找到或正确加载Oracle客户端的oci.dll库文件,这是Oracle Instant Client的一...

    Maven常见问题解答

    3. **Maven构建提示`Could not initialize class org.apache.maven.plugin.war.util.WebappStructureSerializer`**:这个问题通常意味着`maven-war-plugin`插件的版本太低,无法与当前Maven环境兼容。解决方法是在`...

    json-lib-2.1 2.2 2.3 2.4-jdk15

    JSONArray.fromObject(map)报错:Could not initialize class net.sf.json.JsonConfig。ireport 需要高于2.1版本的包。于是就找了这些包。最后2.2.2适合

    eclipse Activiti 插件 jar包 出错

    org.eclipse.emf.transaction org.eclipse.emf.validation org.eclipse.emf.workspace org.activiti.designer.feature org.eclipse.graphiti.feature org.activiti.designer.eclipse org.activiti.designer.gui org....

    derby_ui_plugin_1.1.1

    Derby UI Plugin 1.1.1 是一个专门为Java开发者设计的用户界面插件,它在Java学习过程中能提供极大的便利。这个插件版本号为1.1.1,暗示了它可能包含了一些修复和改进,以提升用户体验和兼容性。...

    Hadoop1.0部署的各种坑及解决之道

    NULL 博文链接:https://ajaxcn.iteye.com/blog/2288977

    gnu.io.SerialPort( rxtx-2.1.7.jar)

    gnu.io.CommDriver.class gnu.io.CommPort.class gnu.io.CommPortEnumerator.class gnu.io.CommPortIdentifier.class gnu.io.CommPortOwnershipListener.class gnu.io.Configure.class gnu.io.I2C.class gnu.io.I2...

    selenium3.141.59

    最新版selenium的maven依赖。 首先需要安装好maven环境。 操作步骤如下: 1.建立maven项目; 2.将文件中的元素复制到pom.xml的元素中; 3.打开cmd。切换到pom.xml的目录表; 4.执行mvn install;...

    Java常见问题集锦 java_faq.rar

    Java是一种广泛使用的面向对象的编程语言,由Sun Microsystems(现为Oracle公司的一部分)于1995年发布。它的设计目标是具有简单性、面向对象、健壮性、安全性、可移植性等特性,使得Java在各种平台上的应用开发变得...

    jasperreport maven打包后找不到字体解决方案

    jasperreport 用maven打包后找不到字体解决方案 net.sf.jasperreports.engine.JRRuntimeException: Could not load the following font

    slf4j中的MDC

    SLF4J(Simple Logging Facade for Java)是Java中一个简单日志门面的接口,它为各种日志框架提供了统一的API,比如Logback、Log4j等。MDC,全称Mapped Diagnostic Context,是SLF4J提供的一种上下文诊断功能,用于...

Global site tag (gtag.js) - Google Analytics