You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Reinier Mostert <re...@clabo.co.za> on 2003/04/03 23:17:20 UTC

jChart in Tapestry 2.4 alpha 5

Hi all,

Trying to render a graph using jChart, seeing as that is what's used in
the newest alpha.

However, I get a NoClassDefFoundError in the first line of getChart
(copied from the demo), which reads:

   public Chart getChart() {
        LegendProperties legendProperties = new LegendProperties();
        legendProperties.setNumColumns(2);
        legendProperties.setPlacement(LegendProperties.RIGHT);
 
It gives:

Exceptions:

java.lang.NoClassDefFoundError
clabo.kfc.pages.ViewTurnoverPage.getChart(ViewTurnoverPage.java:331)
clabo.kfc.components.ChartService.service(ChartService.java:129)
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:878)

I've once seen it go one level further, and give a NoClassDefFoundError
looking for java.awt.Paint.  So, I'm thinking it's because I do not have
the rt.jar in my classpath.  Does this make sense, and if so, how do I
add it to the classpath for my app, or for tomcat?

Thanx
reinier

-- 
------------------------------------------------------------------------------
     reinier.mostert@bigfoot.com      Linux - choice of a GNU
generation!  

Outside of a dog, a book is a man's best friend.  Inside a dog it's too
dark to read.
        -- Groucho Marx


Re: jChart in Tapestry 2.4 alpha 5

Posted by Reinier Mostert <re...@clabo.co.za>.
Thanx a lot to everybody who commented, and especially to Miles.  The
-Djava.awt.headless=true property sorted it out!!  I've been on one or
two wrong tracks, but in the end it works!

Yea for Tapestry, Cayenne and jFreeChart!

reinier

On Thu, 2003-04-10 at 09:55, Miles Egan wrote:
> I think that you can also (at least with jdk 1.4) set the system 
> property java.awt.headless=true to keep awt happy without an x server.
> 
> 
> Richard Kirby wrote:
> > Adam Greene wrote:
> > 
> >> You will have the same problem running headless with any charting kit.
> >>
> >> ----- Original Message -----
> >> From: "Reinier Mostert" <re...@clabo.co.za>
> >> To: "Tapestry users" <ta...@jakarta.apache.org>
> >> Sent: Thursday, April 03, 2003 7:03 PM
> >> Subject: RE: jChart in Tapestry 2.4 alpha 5
> >>
> >>
> >>  
> >>
> >>> yip, jChart.jar is in WEB-INF/lib
> >>>
> >>> and the env is Linux (with the Galeon browser running under X on the
> >>> same machine, but my clients will be over the LAN) - does that mean
> >>> jChart will not work?  If so, I'll try JFreeChart . . .
> >>>
> >>> thanx
> >>> reinier
> >>>
> >>> On Thu, 2003-04-03 at 23:27, Howard M. Lewis Ship wrote:
> >>>   
> >>>
> >>>> Where is the jChart.jar library on the classpath?  In WEB-INF/lib?
> >>>>
> >>>> Also, what env are you in?  As I understand it, when running 
> >>>> headless on
> >>>> many *nix systems, the AWT (the foundation of Java 2D and jCharts) is
> >>>>     
> >>
> >> not
> >>  
> >>
> >>>> available, since it relies on X11 running in the background.
> >>>>     
> > 
> > 
> > Two options are detailed in http://www.davisor.com/2d/doc/faq.html. The 
> > first is using a library called Pure Java AWT (PJA), and the second 
> > which I have successfully used on Linux, is to use the Xvfb (virtual 
> > frame buffer), which is basically a X11 server running in virtual memory 
> > without any need for a graphics card.
> > 
> > Richard.
> > -- Technical Director, CAPDM Ltd.
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > 
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 
> 
-- 
------------------------------------------------------------------------------
     reinier.mostert@bigfoot.com      Linux - choice of a GNU
generation!  

I will always cherish the initial misconceptions I had about
you.

  -- Useful Phrases at Work


Re: jChart in Tapestry 2.4 alpha 5

Posted by Miles Egan <mi...@caddr.com>.
I think that you can also (at least with jdk 1.4) set the system 
property java.awt.headless=true to keep awt happy without an x server.


Richard Kirby wrote:
> Adam Greene wrote:
> 
>> You will have the same problem running headless with any charting kit.
>>
>> ----- Original Message -----
>> From: "Reinier Mostert" <re...@clabo.co.za>
>> To: "Tapestry users" <ta...@jakarta.apache.org>
>> Sent: Thursday, April 03, 2003 7:03 PM
>> Subject: RE: jChart in Tapestry 2.4 alpha 5
>>
>>
>>  
>>
>>> yip, jChart.jar is in WEB-INF/lib
>>>
>>> and the env is Linux (with the Galeon browser running under X on the
>>> same machine, but my clients will be over the LAN) - does that mean
>>> jChart will not work?  If so, I'll try JFreeChart . . .
>>>
>>> thanx
>>> reinier
>>>
>>> On Thu, 2003-04-03 at 23:27, Howard M. Lewis Ship wrote:
>>>   
>>>
>>>> Where is the jChart.jar library on the classpath?  In WEB-INF/lib?
>>>>
>>>> Also, what env are you in?  As I understand it, when running 
>>>> headless on
>>>> many *nix systems, the AWT (the foundation of Java 2D and jCharts) is
>>>>     
>>
>> not
>>  
>>
>>>> available, since it relies on X11 running in the background.
>>>>     
> 
> 
> Two options are detailed in http://www.davisor.com/2d/doc/faq.html. The 
> first is using a library called Pure Java AWT (PJA), and the second 
> which I have successfully used on Linux, is to use the Xvfb (virtual 
> frame buffer), which is basically a X11 server running in virtual memory 
> without any need for a graphics card.
> 
> Richard.
> -- Technical Director, CAPDM Ltd.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 



Re: jChart in Tapestry 2.4 alpha 5

Posted by Richard Kirby <rb...@capdm.com>.
Adam Greene wrote:

>You will have the same problem running headless with any charting kit.
>
>----- Original Message -----
>From: "Reinier Mostert" <re...@clabo.co.za>
>To: "Tapestry users" <ta...@jakarta.apache.org>
>Sent: Thursday, April 03, 2003 7:03 PM
>Subject: RE: jChart in Tapestry 2.4 alpha 5
>
>
>  
>
>>yip, jChart.jar is in WEB-INF/lib
>>
>>and the env is Linux (with the Galeon browser running under X on the
>>same machine, but my clients will be over the LAN) - does that mean
>>jChart will not work?  If so, I'll try JFreeChart . . .
>>
>>thanx
>>reinier
>>
>>On Thu, 2003-04-03 at 23:27, Howard M. Lewis Ship wrote:
>>    
>>
>>>Where is the jChart.jar library on the classpath?  In WEB-INF/lib?
>>>
>>>Also, what env are you in?  As I understand it, when running headless on
>>>many *nix systems, the AWT (the foundation of Java 2D and jCharts) is
>>>      
>>>
>not
>  
>
>>>available, since it relies on X11 running in the background.
>>>      
>>>

Two options are detailed in http://www.davisor.com/2d/doc/faq.html. The 
first is using a library called Pure Java AWT (PJA), and the second 
which I have successfully used on Linux, is to use the Xvfb (virtual 
frame buffer), which is basically a X11 server running in virtual memory 
without any need for a graphics card.

Richard.
-- Technical Director, CAPDM Ltd.



Re: jChart in Tapestry 2.4 alpha 5

Posted by Adam Greene <ag...@nbnet.nb.ca>.
You will have the same problem running headless with any charting kit.

----- Original Message -----
From: "Reinier Mostert" <re...@clabo.co.za>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, April 03, 2003 7:03 PM
Subject: RE: jChart in Tapestry 2.4 alpha 5


> yip, jChart.jar is in WEB-INF/lib
>
> and the env is Linux (with the Galeon browser running under X on the
> same machine, but my clients will be over the LAN) - does that mean
> jChart will not work?  If so, I'll try JFreeChart . . .
>
> thanx
> reinier
>
> On Thu, 2003-04-03 at 23:27, Howard M. Lewis Ship wrote:
> > Where is the jChart.jar library on the classpath?  In WEB-INF/lib?
> >
> > Also, what env are you in?  As I understand it, when running headless on
> > many *nix systems, the AWT (the foundation of Java 2D and jCharts) is
not
> > available, since it relies on X11 running in the background.
> >
> > --
> > Howard M. Lewis Ship
> > Creator, Tapestry: Java Web Components
> > http://jakarta.apache.org/proposals/tapestry
> >
> >
> >
> > > -----Original Message-----
> > > From: Reinier Mostert [mailto:rendier@clabo.co.za]
> > > Sent: Thursday, April 03, 2003 4:17 PM
> > > To: Tapestry users
> > > Subject: jChart in Tapestry 2.4 alpha 5
> > >
> > >
> > > Hi all,
> > >
> > > Trying to render a graph using jChart, seeing as that is
> > > what's used in the newest alpha.
> > >
> > > However, I get a NoClassDefFoundError in the first line of
> > > getChart (copied from the demo), which reads:
> > >
> > >    public Chart getChart() {
> > >         LegendProperties legendProperties = new LegendProperties();
> > >         legendProperties.setNumColumns(2);
> > >         legendProperties.setPlacement(LegendProperties.RIGHT);
> > >
> > > It gives:
> > >
> > > Exceptions:
> > >
> > > java.lang.NoClassDefFoundError
> > > clabo.kfc.pages.ViewTurnoverPage.getChart(ViewTurnoverPage.java:331)
> > > clabo.kfc.components.ChartService.service(ChartService.java:129)
> > > org.apache.tapestry.engine.AbstractEngine.service(AbstractEngi
> > > ne.java:878)
> > >
> > > I've once seen it go one level further, and give a
> > > NoClassDefFoundError looking for java.awt.Paint.  So, I'm
> > > thinking it's because I do not have the rt.jar in my
> > > classpath.  Does this make sense, and if so, how do I add it
> > > to the classpath for my app, or for tomcat?
> > >
> > > Thanx
> > > reinier
> > >
> > > --
> > > --------------------------------------------------------------
> > > ----------------
> > >      reinier.mostert@bigfoot.com      Linux - choice of a GNU
> > > generation!
> > >
> > > Outside of a dog, a book is a man's best friend.  Inside a
> > > dog it's too dark to read.
> > >         -- Groucho Marx
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> >
> --
> --------------------------------------------------------------------------
----
>      reinier.mostert@bigfoot.com      Linux - choice of a GNU
> generation!
>
> You'd better beat it.  You can leave in a taxi.  If you can't get a
> taxi, you
> can leave in a huff.  If that's too soon, you can leave in a minute and
> a huff.
>         -- Groucho Marx
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>



RE: jChart in Tapestry 2.4 alpha 5

Posted by Reinier Mostert <re...@clabo.co.za>.
yip, jChart.jar is in WEB-INF/lib

and the env is Linux (with the Galeon browser running under X on the
same machine, but my clients will be over the LAN) - does that mean
jChart will not work?  If so, I'll try JFreeChart . . . 

thanx
reinier

On Thu, 2003-04-03 at 23:27, Howard M. Lewis Ship wrote:
> Where is the jChart.jar library on the classpath?  In WEB-INF/lib?
> 
> Also, what env are you in?  As I understand it, when running headless on
> many *nix systems, the AWT (the foundation of Java 2D and jCharts) is not
> available, since it relies on X11 running in the background.
> 
> --
> Howard M. Lewis Ship
> Creator, Tapestry: Java Web Components
> http://jakarta.apache.org/proposals/tapestry
> 
> 
> 
> > -----Original Message-----
> > From: Reinier Mostert [mailto:rendier@clabo.co.za] 
> > Sent: Thursday, April 03, 2003 4:17 PM
> > To: Tapestry users
> > Subject: jChart in Tapestry 2.4 alpha 5
> > 
> > 
> > Hi all,
> > 
> > Trying to render a graph using jChart, seeing as that is 
> > what's used in the newest alpha.
> > 
> > However, I get a NoClassDefFoundError in the first line of 
> > getChart (copied from the demo), which reads:
> > 
> >    public Chart getChart() {
> >         LegendProperties legendProperties = new LegendProperties();
> >         legendProperties.setNumColumns(2);
> >         legendProperties.setPlacement(LegendProperties.RIGHT);
> >  
> > It gives:
> > 
> > Exceptions:
> > 
> > java.lang.NoClassDefFoundError
> > clabo.kfc.pages.ViewTurnoverPage.getChart(ViewTurnoverPage.java:331)
> > clabo.kfc.components.ChartService.service(ChartService.java:129)
> > org.apache.tapestry.engine.AbstractEngine.service(AbstractEngi
> > ne.java:878)
> > 
> > I've once seen it go one level further, and give a 
> > NoClassDefFoundError looking for java.awt.Paint.  So, I'm 
> > thinking it's because I do not have the rt.jar in my 
> > classpath.  Does this make sense, and if so, how do I add it 
> > to the classpath for my app, or for tomcat?
> > 
> > Thanx
> > reinier
> > 
> > -- 
> > --------------------------------------------------------------
> > ----------------
> >      reinier.mostert@bigfoot.com      Linux - choice of a GNU
> > generation!  
> > 
> > Outside of a dog, a book is a man's best friend.  Inside a 
> > dog it's too dark to read.
> >         -- Groucho Marx
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 
> 
-- 
------------------------------------------------------------------------------
     reinier.mostert@bigfoot.com      Linux - choice of a GNU
generation!  

You'd better beat it.  You can leave in a taxi.  If you can't get a
taxi, you
can leave in a huff.  If that's too soon, you can leave in a minute and
a huff.
        -- Groucho Marx


RE: jChart in Tapestry 2.4 alpha 5

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
Where is the jChart.jar library on the classpath?  In WEB-INF/lib?

Also, what env are you in?  As I understand it, when running headless on
many *nix systems, the AWT (the foundation of Java 2D and jCharts) is not
available, since it relies on X11 running in the background.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



> -----Original Message-----
> From: Reinier Mostert [mailto:rendier@clabo.co.za] 
> Sent: Thursday, April 03, 2003 4:17 PM
> To: Tapestry users
> Subject: jChart in Tapestry 2.4 alpha 5
> 
> 
> Hi all,
> 
> Trying to render a graph using jChart, seeing as that is 
> what's used in the newest alpha.
> 
> However, I get a NoClassDefFoundError in the first line of 
> getChart (copied from the demo), which reads:
> 
>    public Chart getChart() {
>         LegendProperties legendProperties = new LegendProperties();
>         legendProperties.setNumColumns(2);
>         legendProperties.setPlacement(LegendProperties.RIGHT);
>  
> It gives:
> 
> Exceptions:
> 
> java.lang.NoClassDefFoundError
> clabo.kfc.pages.ViewTurnoverPage.getChart(ViewTurnoverPage.java:331)
> clabo.kfc.components.ChartService.service(ChartService.java:129)
> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngi
> ne.java:878)
> 
> I've once seen it go one level further, and give a 
> NoClassDefFoundError looking for java.awt.Paint.  So, I'm 
> thinking it's because I do not have the rt.jar in my 
> classpath.  Does this make sense, and if so, how do I add it 
> to the classpath for my app, or for tomcat?
> 
> Thanx
> reinier
> 
> -- 
> --------------------------------------------------------------
> ----------------
>      reinier.mostert@bigfoot.com      Linux - choice of a GNU
> generation!  
> 
> Outside of a dog, a book is a man's best friend.  Inside a 
> dog it's too dark to read.
>         -- Groucho Marx
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>