Do you have -Dos400.awt.native=true in your JAVA_OPTS ?

In catalina.sh in the bin folder I have this line (among others) at the top of the file:
export -s JAVA_OPTS="-Dos400.awt.native=true -Djava.awt.headless=true -Djava.version=1.6 -Xms256m -Xmx512m"

That might help.

Pete Helgren
Value Added Software, Inc
www.petesworkshop.com
GIAC Secure Software Programmer-Java


On 4/30/2012 12:14 PM, tim.dclinc@xxxxxxxxx wrote:
I have a servlet that was located on a windows tomcat server. I
installed this app on the iseries. It basically creates a gif that is
displayed on a web page.

Here is a snippet:
protected void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
random = getrandom(random);
response.setContentType("image/gif");
OutputStream out = response.getOutputStream();

When i run the app, i get the following error:

*exception*

javax.servlet.ServletException: Servlet execution threw an exception

*root cause*

java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java:64)
sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:167)
java.security.AccessController.doPrivileged(AccessController.java:202)
sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:143)
java.lang.J9VMInternals.initializeImpl(Native Method)
java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
java.lang.Class.forNameImpl(Native Method)
java.lang.Class.forName(Class.java:139)
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:79)
java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1146)
java.awt.image.BufferedImage.getGraphics(BufferedImage.java:1136)
loginimggen.loginimggen.doGet(loginimggen.java:33)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


Any idea what causes this?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.