Could not initialize class sun.awt.X11GraphicsEnvironment on Solaris

6
I get error on Mendix platform when I try to upload the image into the system. At first sign I though it might be caused by the lack of permission rights on the uploadfiles/ and thumbs/ folder. But this error still occur after I grant the full permission to these folders with chmod 777. Do anyone have idea what is the problem. I really need the answer very soon, thank you. Here is the full stack trace: 2009-08-30 17:25:22.150 ERROR - EXTERNALINTERFACE: Could not initialize class sun.awt.X11GraphicsEnvironment java.lang.Class.forName0(Native Method) java.lang.Class.forName(Class.java:169) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68) java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1135) com.mendix.connectionbus.connections.A.A.A(FileDataStore.java:192) com.mendix.connectionbus.connections.A.A.A(FileDataStore.java:111) com.mendix.connectionbus.D.A(ConnectionBus.java:345) com.mendix.core.Core.storeImageDocumentContent(Core.java:1565) com.mendix.externalinterface.servlet.FileServlet.A(FileServlet.java:99) com.mendix.externalinterface.servlet.MxServlet.B(MxServlet.java:129) com.mendix.externalinterface.servlet.MxServlet.doPost(MxServlet.java:112) javax.servlet.http.HttpServlet.service(HttpServlet.java:727) javax.servlet.http.HttpServlet.service(HttpServlet.java:820) org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49) org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) org.mortbay.jetty.Server.handle(Server.java:324) org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842) org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648) org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
asked
2 answers
6

I don't have a Solaris environment handy to test this in, but it appears that the Java runtime expects some form of X interaction. Try adding the following flag to the server invocation,

-Djava.awt.headless=true

If this doesn't work, please provide the JVM version, Solaris version and system architecture (SPARC or Intel, I assume).

answered
1

Michiel, Thank you very much. Mendix platform can generate thumbnails now.

answered