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"
相关推荐
NULL 博文链接:https://smartgwt.iteye.com/blog/1252268
java.lang.NoClassDefFoundError: Could not initialize class org.apache.derby.jdbc.AutoloadedDriver40 导致的原因: 在azkaban的server和executor中缺少一个叫derby.jar的包
监听COM口启动程序报错 Could not initialize class gnu.io.RXTXCommDriver异常 是因为需要在%JAVA_HOME%/jre/bin目录中添加rxtxParallel.dll、rxtxSerial.dll文件
内涵jacob_1.14.3-x64.dll;jacob_1.14.3-64.jdk(maven地址);解决方法:Could not initialize class com.jacob.com.ComThread
使用javacpp技术,在32位linux系统上实现视频截图功能,注意so文件放在liberary_path里面
JSONArray.fromObject(map)报错:Could not initialize class net.sf.json.JsonConfig。ireport 需要高于2.1版本的包。于是就找了这些包。最后2.2.2适合
在学java2的用户,不妨看看
NULL 博文链接:https://ajaxcn.iteye.com/blog/2288977
编译tika源文件最难找的jar包,独一无二,赶快来下载吧~
缺少这个包可能导致Could not initialize class net.sf.json.JsonConfig 使用json时候将会用到的一个jar包,发现这个包在网上提供的比较少.缺少这个包可能导致Could not initialize class net.sf.json.JsonConfig ...
主要介绍了Plsql Developer连接Oracle时出现Could not initialize oci.dll解决方案,需要的朋友可以参考下
Java常见问题集锦 java_faq.rar
Tesseract OCR API的Java JNA包装器 Tess4J API 提供的功能: 1、直接识别支持的文件 2、识别图片流 3、识别图片的某块区域 4、将识别结果保存为 TEXT/ HOCR/ PDF/ UNLV/ BOX 5、通过设置取词的等级,提取识别出来...
NULL 博文链接:https://yuhuiblog695685688425687986842568269.iteye.com/blog/2414873
NULL 博文链接:https://bijian1013.iteye.com/blog/2431392
前端纯js加密、以及后端java解密代码。...常用的主要有SM2,SM3,SM4。 ...该算法已公开。由于该算法基于ECC,故其签名速度与秘钥生成速度都快于RSA。 SM3:消息摘要。可以用MD5作为对比理解。该算法已公开。...
解决hbase client在windows环境下报Could not initialize class org.fusesource.jansi.internal.Kernel32的问题,把jar包放入hbase client的lib包下,重新运行hbase.cmd shell即可
XP系统在回放LoadRunner11录制脚本时提示“Vuser failed to initialize extension LrXml.dll”的解决方法
dbeaver中连接impala所需jdbc包,适用于CDH5.16.2,impala2.12
本代码为本人最近开发用过的demo,前端后端的代码都已包括,只需根据自己的需求稍作修改即可;