Could not initialize class sun.awt.X11GraphicsEnvironment linux中影像缩略图

********** Exception occurred at Mon Nov 20 18:23:26 CST 2017 **********
*Description  :Could not initialize class sun.awt.X11GraphicsEnvironment
*Other Info   :null
*DetailMessage: 
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:171)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1135)
at java.awt.image.BufferedImage.getGraphics(BufferedImage.java:1125)
at com.sinosoft.image.util.FileViewUtils.createThumb(FileViewUtils.java:139)
at com.sinosoft.image.ui.control.UIThumbControl.createThumbFile(UIThumbControl.java:131)
at com.sinosoft.image.ui.control.UIThumbControl.getThumbInputStream(UIThumbControl.java:60)
at com.sinosoft.image.ui.servlet.FileViewServlet.doPost(FileViewServlet.java:102)
at com.sinosoft.image.ui.servlet.FileViewServlet.doGet(FileViewServlet.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at org.ecside.filter.ECSideFilter.doFilter(ECSideFilter.java:188)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at com.sinosoft.framework.web.control.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at com.sinosoft.image.ui.servlet.PageLogFilter.doFilter(PageLogFilter.java:60)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)

at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)


解决办法

setDomainEnv.sh中新增

if [ "${WEBLOGIC_EXTENSION_DIRS}" != "" ] ; then
JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.ext.dirs=${WEBLOGIC_EXTENSION_DIRS}"
export JAVA_OPTIONS
fi

JAVA_OPTIONS="${JAVA_OPTIONS} -Djava.awt.headless=true"
export JAVA_OPTIONS

你可能感兴趣的:(linux)