You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Oliver Meyn <li...@mineallmeyn.com> on 2003/03/27 20:16:51 UTC

Xvfb and tomcat - how?

Hi all,

I'm using the cewolf taglib (which incorporates JFreeChart) to draw charts
on Linux.  It would seem that cewolf requires an x-server to draw its charts
(-Djava.awt.headless=true is _not_ good enough) and one possible solution is
using Xvfb.  The trouble is I can't seem to get Tomcat and the xvfb to
communicate - the cewolf img just hangs on an eternal load.  Anyone
successfully set this combo up can give me a step-by-step?

I've tried:
Xvfb :1
export DISPLAY=:1
tomcat/bin/startup.sh

and variations on that theme but always the same problem.  I'm running
Tomcat 4.0.6, j2sdk1.4.1_02, Apache 1.3.27 on RH 7.3 (2.4.18).

Many thanks in advance,
Oliver

********************
Oliver Meyn
oliver@mineallmeyn.com
"Things should be made as simple as possible, but no simpler." - Albert
Einstein


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


RE: Xvfb and tomcat - how?

Posted by Oliver Meyn <li...@mineallmeyn.com>.
I'm bemused to report that my problems were (of course) a result of my own
mistakes.  The NoClassDefFound error was not the cewolf faq problem of
missing X but rather an actual missing jar!  On top of that JkMount wasn't
configured to properly intercept calls to cewolf*.  Things are now working
fine with -Djava.awt.headless=true, but for my own amusement (!) I tried but
still failed to get xvfb to work (image download just hangs).

The input from the list did, however, provide the ever valuable info that it
_should_ work, and based on that I finally found the solution.

Thanks all for your help,
Oliver

> -----Original Message-----
> From: Oliver Meyn [mailto:lists@mineallmeyn.com]
> Sent: March 27, 2003 16:28
> To: Tomcat Users List
> Subject: RE: Xvfb and tomcat - how?
>
>
> Hi Eric,
>
> > I'm curious as to what problems you are having with Cewolf and
> > JFreeChart when using the headless="true" attribute.  I have samples of
> > both CeWolf and JFreeChart running fine on Tomcat 4.1.18 and 4.1.24 with
> > just setting -Djava.awt.headless=true in the Tomcat startup.
> >
> > RH 7.3 and 8.0
> > JDK 1.4.1_02
> >
>
> Well now that _is_ interesting... Before we get any further I will make a
> dead simple test app (or perhaps use one of the demo wars) and test a few
> different possibilities - as it stands I'm either getting a
> NoClassDefFound
> exception (which is a symptom of the headless problem according to the
> CeWolf faq) or the image hangs while loading.  Of course
> everything is fine
> on my windows machine.
>
> I'll report back with my results.
>
> Thanks all,
> Oliver
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


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


RE: Xvfb and tomcat - how?

Posted by Oliver Meyn <li...@mineallmeyn.com>.
Hi Eric,

> I'm curious as to what problems you are having with Cewolf and
> JFreeChart when using the headless="true" attribute.  I have samples of
> both CeWolf and JFreeChart running fine on Tomcat 4.1.18 and 4.1.24 with
> just setting -Djava.awt.headless=true in the Tomcat startup.
>
> RH 7.3 and 8.0
> JDK 1.4.1_02
>

Well now that _is_ interesting... Before we get any further I will make a
dead simple test app (or perhaps use one of the demo wars) and test a few
different possibilities - as it stands I'm either getting a NoClassDefFound
exception (which is a symptom of the headless problem according to the
CeWolf faq) or the image hangs while loading.  Of course everything is fine
on my windows machine.

I'll report back with my results.

Thanks all,
Oliver


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


Re: Xvfb and tomcat - how?

Posted by Eric Weidner <er...@ejbsolutions.com>.
Oliver,

I'm curious as to what problems you are having with Cewolf and 
JFreeChart when using the headless="true" attribute.  I have samples of 
both CeWolf and JFreeChart running fine on Tomcat 4.1.18 and 4.1.24 with 
just setting -Djava.awt.headless=true in the Tomcat startup.

RH 7.3 and 8.0
JDK 1.4.1_02

Eric

Oliver Meyn wrote:

>Hi Paul,
>
>  
>
>>hiya:
>>
>>Yip: I've been using JFreeChart with huge success on a headless linux
>>box: You do not need Tomcat and xvfb to communicate as such, xvfb just
>>needs to be running.
>>
>>I start mine with
>>
>>Xvfb :0 -screen 0 1600x1200x32 &
>>
>>    
>>
>
>Did you have to do any special recompiling with those settings in effect?
>I've read that some are having to do that, but it's not clear to me how/why
>ie have to recompile code on the production box?
>
>Getting closer,
>Oliver
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>  
>


RE: Xvfb and tomcat - how?

Posted by Oliver Meyn <li...@mineallmeyn.com>.
Hi Paul,

Thanks for being precise - I'm very pleased to know that it is possible with
my setup - now I just need to figure out what's wrong.  I suspect it is the
cewolf tags which introduce their own AWT dependencies above and beyond
Jfreechart.  That's easy enough to test, which I'm doing now :)

Cheers,
Oliver

> -----Original Message-----
> From: p niemandt [mailto:maudib@acesurfer.co.za]
> Sent: March 27, 2003 15:32
> To: Tomcat Users List
> Subject: RE: Xvfb and tomcat - how?
>
>
> Hi Oliver:
>
> Nope:
>
> My deployment is extremely simple: I have 2 boxes: One Dev, one Prod: I
> compile my servlet on my dev box (RedHat 8.0, XFree 4, KDE 3.1, JDK 1.4,
> Tomcat 4.18), and copy the results to my prod box: (RedHat 7, JDK 1.4,
> Tomcat 4.18, console only). I just run Xvfb before starting Tomcat /
> make sure it is running - Just to reiterate, I do not use the headless
> vm settings at all on my production box, and I have not had any
> problems. Tomcat & Xvfb has been running for a few months non stop now
> ...
>
> hth,
> Paul
>
>
>
> On Thu, 2003-03-27 at 20:19, Oliver Meyn wrote:
> > Hi Paul,
> >
> > > hiya:
> > >
> > > Yip: I've been using JFreeChart with huge success on a headless linux
> > > box: You do not need Tomcat and xvfb to communicate as such, xvfb just
> > > needs to be running.
> > >
> > > I start mine with
> > >
> > > Xvfb :0 -screen 0 1600x1200x32 &
> > >
> >
> > Did you have to do any special recompiling with those settings
> in effect?
> > I've read that some are having to do that, but it's not clear
> to me how/why
> > ie have to recompile code on the production box?
> >
> > Getting closer,
> > Oliver
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> --
> p niemandt <ma...@acesurfer.co.za>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


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


RE: Xvfb and tomcat - how?

Posted by p niemandt <ma...@acesurfer.co.za>.
Hi Oliver:

Nope: 

My deployment is extremely simple: I have 2 boxes: One Dev, one Prod: I
compile my servlet on my dev box (RedHat 8.0, XFree 4, KDE 3.1, JDK 1.4,
Tomcat 4.18), and copy the results to my prod box: (RedHat 7, JDK 1.4,
Tomcat 4.18, console only). I just run Xvfb before starting Tomcat /
make sure it is running - Just to reiterate, I do not use the headless
vm settings at all on my production box, and I have not had any
problems. Tomcat & Xvfb has been running for a few months non stop now
...

hth,
Paul



On Thu, 2003-03-27 at 20:19, Oliver Meyn wrote:
> Hi Paul,
> 
> > hiya:
> >
> > Yip: I've been using JFreeChart with huge success on a headless linux
> > box: You do not need Tomcat and xvfb to communicate as such, xvfb just
> > needs to be running.
> >
> > I start mine with
> >
> > Xvfb :0 -screen 0 1600x1200x32 &
> >
> 
> Did you have to do any special recompiling with those settings in effect?
> I've read that some are having to do that, but it's not clear to me how/why
> ie have to recompile code on the production box?
> 
> Getting closer,
> Oliver
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
-- 
p niemandt <ma...@acesurfer.co.za>


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


RE: Xvfb and tomcat - how?

Posted by Oliver Meyn <li...@mineallmeyn.com>.
Hi Paul,

> hiya:
>
> Yip: I've been using JFreeChart with huge success on a headless linux
> box: You do not need Tomcat and xvfb to communicate as such, xvfb just
> needs to be running.
>
> I start mine with
>
> Xvfb :0 -screen 0 1600x1200x32 &
>

Did you have to do any special recompiling with those settings in effect?
I've read that some are having to do that, but it's not clear to me how/why
ie have to recompile code on the production box?

Getting closer,
Oliver


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


Re: Xvfb and tomcat - how?

Posted by p niemandt <ma...@acesurfer.co.za>.
hiya:

Yip: I've been using JFreeChart with huge success on a headless linux
box: You do not need Tomcat and xvfb to communicate as such, xvfb just
needs to be running.

I start mine with

Xvfb :0 -screen 0 1600x1200x32 &

hth,
Paul



On Thu, 2003-03-27 at 19:16, Oliver Meyn wrote:
> Hi all,
> 
> I'm using the cewolf taglib (which incorporates JFreeChart) to draw charts
> on Linux.  It would seem that cewolf requires an x-server to draw its charts
> (-Djava.awt.headless=true is _not_ good enough) and one possible solution is
> using Xvfb.  The trouble is I can't seem to get Tomcat and the xvfb to
> communicate - the cewolf img just hangs on an eternal load.  Anyone
> successfully set this combo up can give me a step-by-step?
> 
> I've tried:
> Xvfb :1
> export DISPLAY=:1
> tomcat/bin/startup.sh
> 
> and variations on that theme but always the same problem.  I'm running
> Tomcat 4.0.6, j2sdk1.4.1_02, Apache 1.3.27 on RH 7.3 (2.4.18).
> 
> Many thanks in advance,
> Oliver
> 
> ********************
> Oliver Meyn
> oliver@mineallmeyn.com
> "Things should be made as simple as possible, but no simpler." - Albert
> Einstein
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
-- 
p niemandt <ma...@acesurfer.co.za>


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