tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Sabroff <mike.sabr...@cygnusb2b.com>
Subject Re: Tomcat + Linux Server + Jasper Reports problem
Date Wed, 08 Feb 2006 14:41:58 GMT
Why not just set the environment variable to wherever the reports are 
expected to be produced.
In other words, if it is the macine you are on, use "unix:0.0" if it is 
another machine, get ip of that machine and set the DISPLAY variable to 
"whateverip:0.0" that is providing there is an XServer running on that box.

� wrote:
> the Anyone?
>
> On 2/7/06, Let�cia �lvares Barbalho <leticia.barbalho@gmail.com> wrote:
>   
>> 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
>> leticia.barbalho@gmail.com
>>     
>
>
>
>
> --
> Let�cia �lvares Barbalho
> leticia.barbalho@gmail.com
>
>   

-- 
Mike Sabroff
Web Services
Developer
mike.sabroff@cygnusb2b.com
920-568-8379


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message