New version of JFreeChart Sample WAR available

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
murthy

Post by murthy » Wed Feb 25, 2004 6:23 pm

Hi Richard,
Thanks for your WAR file I am able to generate a graph from JSP. I'm not able to pass a value to the jsp script called in the URL. Apparently the session is invalidated. I am thinking another way is to customize the generateURL method of StandardCategoryURLGenerator. But I don't know how. I appreciate any help you can give me.

Thanks
Murthy

Guest

Post by Guest » Wed Feb 25, 2004 9:16 pm

I could implement the custom URL generator with some tweaking. The j2se 1.4 compiler was not happy until I added the clone() method. I'm curious to know why.

public class urlgen implements CategoryURLGenerator {
private String todt="";
private Map trnkmap =new HashMap();
public urlgen() {};
public urlgen (String todt, Map trkmap )
{
this.todt=todt;
trnkmap=trkmap;

}

public String generateURL(CategoryDataset categoryDataset, int series, int c
ategory) {
String returnString = "";
Comparable categoryKey = categoryDataset.getColumnKey(category);
Comparable seriesKey = categoryDataset.getRowKey(series);
try {
returnString = "../../ldr/vwgraf.jsp?dt=" + todt + "&series=" + seriesKe
y
+ "&bar=" + URLEncoder.encode((String)trnkmap.get(categoryKey.toString()), "
UTF-8");
} catch (Exception e) {};

return returnString ;
}
public Object clone(){ urlgen u=new urlgen(); return (Object)u;}
}

richard_atkinson
Posts: 115
Joined: Fri Mar 14, 2003 3:13 pm
Location: London, England
Contact:

JFreeChart Sample WAR Update

Post by richard_atkinson » Thu Feb 26, 2004 9:27 pm

I've updated the WAR file again. This source included in the WAR file at the last update was out of sync with class files. Sorry for the inconvenience. Thanks to Marie Ney for reporting the problem.

Regards,
Richard...

richard_atkinson
Posts: 115
Joined: Fri Mar 14, 2003 3:13 pm
Location: London, England
Contact:

JFreeChart Sample WAR

Post by richard_atkinson » Thu Apr 01, 2004 8:45 pm

The WAR file is now updated to use JFreeChart 0.9.17.

Regards,
Richard...

black_fire

War file don't work in Linux Slackware

Post by black_fire » Fri Apr 23, 2004 9:10 pm

Hi everybody!

I was trying to use the war file in linux, but it didn't work and did return a error message.
What I need to do, for the JFreeChart work with linux?

Thank you for atention. Any help are welcome!

Code: Select all

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException
	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
	org.apache.jsp.xy_005farea_005fchart_jsp._jspService(xy_005farea_005fchart_jsp.java:94)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

root cause

java.lang.NoClassDefFoundError
	org.jfree.chart.axis.Axis.<init>(Axis.java:180)
	org.jfree.chart.axis.ValueAxis.<init>(ValueAxis.java:226)
	org.jfree.chart.axis.DateAxis.<init>(DateAxis.java:333)
	org.jfree.chart.axis.DateAxis.<init>(DateAxis.java:318)
	org.jfree.chart.demo.servlet.WebHitChart.generateXYAreaChart(WebHitChart.java:233)
	org.apache.jsp.xy_005farea_005fchart_jsp._jspService(xy_005farea_005fchart_jsp.java:51)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

note The full stack trace of the root cause is available in the Tomcat logs.

black_fire

War file don't work in Linux Slackware

Post by black_fire » Fri Apr 23, 2004 9:14 pm

To complements.
I'm using Slackware 9.1

Thank you again.

Rodrigo G. Tavares de Souza
São Paulo - Brazil
+55 (11) 3824-6859

jcamp
Posts: 36
Joined: Thu Apr 01, 2004 4:20 pm

war file

Post by jcamp » Sun Apr 25, 2004 2:41 am

richard,

when i try to download your war file i get gobbldygoop. i'm downloading in linux, is there something i'm missing here ??

richard_atkinson
Posts: 115
Joined: Fri Mar 14, 2003 3:13 pm
Location: London, England
Contact:

JFreeChart Sample WAR Updated

Post by richard_atkinson » Sun Apr 25, 2004 4:59 pm

The WAR file is now updated to use JFreeChart 0.9.18.

Regarding the other problems, I don't use Linux myself but Dave Gilbert does. He and a number of others have got the sample WAR file working successfully on a variety of distros.

When downloading make sure that you are trying to save the WAR file rather than open it in the browser. Also when deploying in your application server make sure you are either running "headless" or have an X server available. Search the forum for X11 for more information.

Regards,
Richard...

Guest

Post by Guest » Mon Apr 26, 2004 4:13 pm

richard_atkinson wrote:I don't use Linux myself but Dave Gilbert does. He and a number of others have got the sample WAR file working successfully on a variety of distros.
Thank you Richard!
I could use the war file. I needed install the Xvfb to emulate the X11 server, because as my Server do not has XWindows, I needed make it.
Everybody, can see more information at url that follow below:
http://forum.java.sun.com/thread.jsp?th ... ge=1973308
pgerio - from java technology forums wrote: My solution is simple. I've worked one day on it.
You just install Xvfb (you can get it from the web or Linux distributions). The name of the file is XFree86-Xvfb-xxxxxx.rpm.

Code: Select all

To istall, run:
$ rpm -iv XFree86-Xvfb-xxxxxx.rpm

Then you run it in background(&) :
$ Xvfb :1 -screen 0 800x600x16 &

And set the DISPLAY variable:
$ export DISPLAY=:1.0

richard_atkinson
Posts: 115
Joined: Fri Mar 14, 2003 3:13 pm
Location: London, England
Contact:

JFreeChart Sample WAR Updated

Post by richard_atkinson » Wed Jun 02, 2004 8:00 pm

The WAR file is now updated to use JFreeChart 0.9.19.

Regards,
Richard...

alartin

I got the same problem as black_fire's, Who can help?

Post by alartin » Wed Jun 09, 2004 10:56 am

The error is same. Tomcat5 could not find classes. My linux is redhat8.

//////// //////// //////////// /// //////////////
/// /// /// /// /// ///
/// /// /// /// /// ///
///////////// //////////// /// //////////////
/// /// /// /// ///
/// /// /// /// /// ///
////// /////// //////////// ////////////// ///

richard_atkinson
Posts: 115
Joined: Fri Mar 14, 2003 3:13 pm
Location: London, England
Contact:

JFreeChart Sample WAR

Post by richard_atkinson » Mon Jun 14, 2004 9:37 pm

The WAR file is now updated to use JFreeChart 0.9.20.

Regards,
Richard...

P.S. To the poster above, I test the WAR file using Tomcat 5 and it works alright for me. Try searching for forum for X11 issues and make sure you do not have any other copies of JFreeChart lurking anywhere in your Tomcat installation.

illuminers
Posts: 1
Joined: Mon Jul 12, 2004 11:30 am

Post by illuminers » Mon Jul 12, 2004 11:32 am

@richard atkinson,..

hi,
is there any restrictions for using your sample WAR files
cause im currently using JDK 1.3.0_02
with servlets version 2.2 and JSP 1.1
and I got some errors that i couldn't understand

thanks in advance

Saran

Post by Saran » Tue Sep 28, 2004 11:53 pm

I generated the PNG file using the example. When i print the file name, it is prinint perfectly.

But i don't know, where exactly it is saved in the server. Could you let me know, how to display the image in the browser.

alejo

about org.jfree

Post by alejo » Wed Apr 20, 2005 10:16 pm

Hi everyone:

Im wondering if anyone of you know where can i get the java files of the org.jfree

thanks :roll:

Locked