Hello everyone,

I developed my webapp using netbeans and its embedded tomcat. I did some
reports in jasper reports and they were working just fine with the embedded
tomcat.

Then, I moved my app to the tomcat directory in the server (which is the
same machine) and the reports stopped working. They don't work locally in
the server and they don't work when accessing the app from any other client
machine (being linux or windows).

At first, I was getting the following error:

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.<clinit>(X11GraphicsEnvironment.java:134)
        java.lang.Class.forName0(Native Method)
        java.lang.Class.forName(Class.java:141)
        
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)



Through google I found out that I should use the catalina.sh file to set:

 JAVA_OPTS="-Djava.awt.headless=true"



I did it, but it did not solve the problem. It changed the error. Now I
have:

java.awt.HeadlessException
        java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:121)
        java.awt.Window.<init>(Window.java:274)
        java.awt.Frame.<init>(Frame.java:401)
        java.awt.Frame.<init>(Frame.java:366)
        javax.swing.JFrame.<init>(JFrame.java:154)
        net.sf.jasperreports.view.JasperViewer.<init>(JasperViewer.java:144)

I tried google, but couldn't find a solution for it. Can someone help,
please? Other important data about my server:

leticia:/home/leticia # java -version
java version "1.4.2_06" Java(TM) 2 Runtime Environment, Standard Edition
(build 1.4.2_06-b03)
Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)
leticia:/home/leticia # echo $JAVA_HOME
/usr/lib/jvm/java
leticia:/home/leticia # echo $PATH
/usr/sbin:/bin:/usr/bin:/sbin:/usr/X11R6/bin

Since it's working fine in the netbeans embedded tomcat and not in my linux
server tomcat, I suppose the problem is in tomcat configuration. Both
tomcat's are in the same computer.

Any help is appreciated

Thanks

--
Letícia Álvares Barbalho
[EMAIL PROTECTED]

Reply via email to