一、错误描述:
webkettle tomcat 启动后,其他菜单正常,但无法显示转换界面 ,提示以下错误
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.mxgraph.util.mxUtils
at com.gsww.sjrh.ext.trans.TransMetaCodec.encode(TransMetaCodec.java:63)
at com.gsww.sjrh.webapp.repository.controller.RepositoryController.open(RepositoryController.java:350)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:114)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
并且,查看 Tomcat 日志 catalina.out ,有以下错误:
Can't connect to X11 window server using 'localhost:12.0' as the value of th
二、分析原因:
是linux下没有启动 java 的图形渲染
三、解决方案:
编辑vi /etc/profile 文件,在其中加入
export JAVA_OPTS=-Djava.awt.headless=true
然后立即生效一下配置文件