cewolf and java 1.5

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
harshanagesh
Posts: 12
Joined: Fri Jan 06, 2006 1:36 am

cewolf and java 1.5

Post by harshanagesh » Sat Jan 14, 2006 7:25 pm

I had a working setup of cewolf with my tomcat 5.5.9 installation and java 1.4. But when I upgraded to tomcat 5.5.12 and java 1.5 the cewolf jsp's
don't seem to work and the servlet java compiler is giving lot of compilation errors. Has cewolf been tested for java 1.5 ?

dvader666@usa.net

Same problem with Tomcat 5.5.x and Java 1.5.0?

Post by dvader666@usa.net » Wed Mar 01, 2006 2:13 am

I'm having the same problem.

The same webapp using Tomcat 4.1.x and Java 1.4.2 now is giving me cewolf errors when moved it to Tomcat 5.5.x and Java 1.5.0.

For those charts where I create my own implementation of de.laures.cewolf.DatasetProducer as another Java object like:

public class CategoryData implements DatasetProducer, Serializable {...}

...which then is invoked later from JSP using <jsp:useBean.../> the charts work. BUT if I use the same approach as with the sample webapp that comes with cewolf by defining the DatasetProducer directly in JSP using scriptlets, like (taken from sample cewolf webapp):

...
DatasetProducer categoryData = new DatasetProducer() {
public Object produceDataset(Map params) {
final String[] categories = { "apples", "pies", "bananas", "oranges" };
final String[] seriesNames = { "Peter", "Helga", "Franz", "Olga" };
final Integer[][] startValues = new Integer[seriesNames.length][categories.length];
final Integer[][] endValues = new Integer[seriesNames.length][categories.length];
for (int series = 0; series < seriesNames.length; series++) {
for (int i = 0; i < categories.length; i++) {
int y = (int) (Math.random() * 10 + 1);
startValues[series] = new Integer(y);
endValues[series] = new Integer(y + (int) (Math.random() * 10));
}
}
DefaultIntervalCategoryDataset ds =
new DefaultIntervalCategoryDataset(seriesNames, categories, startValues, endValues);
return ds;
}
public String getProducerId() {
return "CategoryDataProducer";
}
public boolean hasExpired(Map params, Date since) {
return false;
}
};
pageContext.setAttribute("categoryData", categoryData);
...

...CHARTS WON'T WORK.


On browser or log files I get errors like:

type Exception report

message

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

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 19 in the jsp file: /cewolfset_inc.jsp
Generated servlet error:
The type new DatasetProducer(){} must implement the inherited abstract method DatasetProducer.hasExpired(Map, Date)

An error occurred at line: 19 in the jsp file: /cewolfset_inc.jsp
Generated servlet error:
The type new DatasetProducer(){} must implement the inherited abstract method DatasetProducer.produceDataset(Map)

...

Again, if I run the same sample webapp on Tomcat 4.1.x and Java 1.4.2 everything works fine.

Any ideas? Please?

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Wed Mar 01, 2006 2:06 pm

It may be worth reporting this to the Cewolf developers:

http://sourceforge.net/projects/cewolf
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

dvader666
Posts: 4
Joined: Wed Mar 19, 2003 5:06 pm
Location: Costa Rica

Reported to Cewolf forums.

Post by dvader666 » Wed Mar 01, 2006 5:21 pm

Yeah I did it almost at the same time I posted that question in this forum, but I have not received an answer so far.

Thanks for the hint though. :)

Locked