Re: [Rxsm-users] image resizing without X possible?
Status: Beta
Brought to you by:
ajwillia-ms
|
From: Andrew E. <an...@el...> - 2005-09-29 20:42:58
|
Lol, you just beat me to it. Never before have I written an FAQ that was useful ;) Rogier Eggers wrote: > Doh. Sorry, just noticed that this is covered in the FAQ. Must have > overlooked that. > > Excerpt from the FAQ: > > *Gallery and HTML pages fail to upload images* > > > Gallery and HTML pages use a thumbnailer to generate the smaller > images. On UNIX systems it is possible for the application server to > fail to find an XServer to draw on. If this is the case then put > > export CATALINA_OPTS='-Djava.awt.headless=true' > > in the tomcat startup scripts. > Note: that this only works for Tomcat, if you are using any other > servlet container you will need to check their documentation. > > > > On Thu, 2005-09-29 at 22:31 +0200, Rogier Eggers wrote: > >> I am setting up a small testsite with XSM from a server in my LAN. I >> want to test the gallery creation with XSM, but I just noticed that >> thumbnail creation requires X. So I installed X, hoping that XSM only >> depends on the X libraries, but it seems that it even requires a >> running X server. Really running an X server on that box is something >> I prefer not to do. >> >> Are there workarounds, so that X is not required? >> >> Or otherwise, can I let it connect with another X server on my LAN >> through the DISPLAY variable? >> >> I tried exporting the display variable to "someotherbox:1.0" just on >> the commandline and then restarting tomcat. But it doesn't help. >> >> The error message I currently get is: >> "Error: Can't connect to X11 window server using ':0.0' as the value >> of the DISPLAY variable." >> >> Debug output below. >> >> Thanks for any tips ! >> >> >> >> Debug output: >> >> java.lang.InternalError: Can't connect to X11 window server using >> ':0.0' as the value of the DISPLAY variable. >> >> at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) >> at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:134) >> at java.lang.Class.forName0(Native Method) >> at java.lang.Class.forName(Class.java:141) >> at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62) >> at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1041) >> at com.rectang.xsm.widget.PreviewedImage.thumbnail(PreviewedImage.java:178) >> at com.rectang.xsm.widget.PreviewedImage.save(PreviewedImage.java:124) >> at com.rectang.xsm.types.GalleryPreviewedImage.save(Gallery.java:243) >> at com.rectang.xsm.doc.DocList.save(DocList.java:62) >> at com.rectang.xsm.doc.DocGroup.save(DocGroup.java:146) >> at com.rectang.xsm.io.XSMDocument.generate(XSMDocument.java:367) >> at com.rectang.xsm.handlers.Page.generate(Page.java:820) >> at com.rectang.xsm.handlers.Page.generate(Page.java:794) >> at com.rectang.xsm.handlers.Page.handle(Page.java:686) >> at com.rectang.xsm.XSM.doGet(XSM.java:153) >> at com.rectang.xsm.XSM.doPost(XSM.java:179) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) >> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) >> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) >> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) >> at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) >> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) >> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) >> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) >> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) >> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) >> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) >> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) >> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) >> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) >> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) >> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) >> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) >> at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) >> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) >> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) >> at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) >> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) >> at java.lang.Thread.run(Thread.java:534) >> |