I have a servlet running in weblogic 4.51 which returns a dynamic image to
the browser.

It uses the following classes:
 com.sun.image.codec.jpeg.JPEGImageDecoder (sun classes included in jdk)
 com.sun.image.codec.jpeg.JPEGImageEncoder (sun classes included in jdk)
 java.awt.image.BufferedImage
 java.awt.Graphics
 java.awt.Image
 java.awt.Canvas
 java.awt.Font
 java.awt.FontMetrics
 java.io.OutputStream
 java.io.FileInputStream
and sends the image stream back to the browser with the relevant jpg mime
type,etc

This works on an NT server running weblogic but fails to work on our Solaris
development server.
The error given is below. I do not open any frames or do anything that
really requires a display
server (e.g. X), so why the error???

The line that is causing the problem within the servlet is just doing a
simple getGraphics():
        line 59: GEACTempCard
                java.awt.Graphics gTemplate = biTemplate.getGraphics();

Am I missing some awt classes in my Sun JVM ??

Any help appreciated!
Jonathan


+++++++++++++++++++++++++++++++++++++++++++++++++
ERROR MESSAGE FROM WEBLOGIC LOG FILE
+++++++++++++++++++++++++++++++++++++++++++++++++

Thu Oct 12 07:07:46 EDT 2000:<E> <HTTP> 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 <Unloaded Method>
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:125)
        at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment
.java:63)
        at
java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1009)
        at java.awt.image.BufferedImage.getGraphics(BufferedImage.java:998)
        at
com.ibm.gianteagle.servlets.GEACTempCard.doGet(GEACTempCard.java:59)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:715)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to