detail problem is here
javax.servlet.ServletException: Can't connect to X11 window server
using ':0.0' as the value of the DISPLAY variable.
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:419)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:408)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:376)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at ngasi.connector.tomcat32.TomcatConnectionHandler.handleConnection(Unknown
Source)
at ezj.b.e.run(Unknown Source)
Root cause:
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:58)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:58)
at java.awt.Window.(Window.java:189)
at java.awt.Frame.(Frame.java:315)
at java.awt.Frame.(Frame.java:262)
at javaside.Rbl.jspChart.init(jspChart.java:88)
at javaside.Rbl.jspChart.init(jspChart.java:70)
at report._0002freport_0002fjspChart_0002ejspjspChart_jsp_0._jspService(_0002freport_0002fjspChart_0002ejspjspChart_jsp_0.java:184)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:183)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:333)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:411)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:408)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:376)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at ngasi.connector.tomcat32.TomcatConnectionHandler.handleConnection(Unknown
Source)
at ezj.b.e.run(Unknown Source)
Now what I do to get rid of this problem
thanks in advance
fiero
If you're running with JDK1.3 or lower, you need to run an X server. If
you don't want to run a "real" one, you can run Xvfb (X virtual frame
buffer) which will work in memory. Alternatively, you can use a Pure
Java AWT implementation such as the one at http://www.eteks.com/pja/en/
If you're using JDK1.4beta I believe you can work in "headless" mode -
see the 1.4 documentation for details.
--
Jon Skeet - <sk...@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too
The probleme is that java requires a GUI to perform AWT functions.
On linux if no X Windows is running you can't do graphics directly.
I've got a tips but i'm not shure if it will be usefull on tomcat
because i'm currently use a commercial servlet engine (ServleExec)
on rh71 with ibm jvm but it works well for me
run an X Virtual Frame Buffer with :
Xvfb -screen 0 1x1x8 &
this starts an virtual frame buffer with 1x1 pixel size and 8 bits color
depth (if you need to display gif generated images), because we don't need
to write directly to the screen a size of 1 pixel will be nice.
hope this will help you...