Thanks everyone,
I've just managed to get rid of the error.
I set the display variable ":0" and then did a "xhost +". I also had to get
rid of the headless parameter, as you said I didn't need it.
Now my report successfully appears on my server.
The thing is that I wanted it to be shown on the machine that requested it.
If I'm in a client machine and request the report, I want it to appear on
this client machine. But the way it is, it always appears on the server.
But I think this is not a problem to be solved on this list, is it?

thanks very much everyone

On 2/8/06, Mike Sabroff <[EMAIL PROTECTED]> wrote:
>
> 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 <[EMAIL PROTECTED]> 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
> >> [EMAIL PROTECTED]
> >>
> >
> >
> >
> >
> > --
> > Let�cia �lvares Barbalho
> > [EMAIL PROTECTED]
> >
> >
>
> --
> Mike Sabroff
> Web Services
> Developer
> [EMAIL PROTECTED]
> 920-568-8379
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

Reply via email to