Problem with deployment

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
kingcu
Posts: 3
Joined: Mon Oct 09, 2006 2:15 pm

Problem with deployment

Post by kingcu » Wed Nov 08, 2006 11:05 pm

I am using JBoss IDE 1.6 (built on Eclipse) and developing a web app that utilize JFreeChart (through Cewolf tags in JSPs). It works fine when I ran it on my local machine.

However, when I deploy it onto the production server (JBoss 4.0.1), the chart is not drawn and an exception is thrown (see below).

Anyone else having this problem? Thanks.

java.lang.NoClassDefFoundError
at org.jfree.chart.ChartFactory.createPieChart(ChartFactory.java:231)
at de.laures.cewolf.taglib.CewolfChartFactory.getChartInstance(CewolfChartFactory.java:137)
at de.laures.cewolf.taglib.SimpleChartDefinition.produceChart(SimpleChartDefinition.java:30)
at de.laures.cewolf.taglib.AbstractChartDefinition.getChart(AbstractChartDefinition.java:121)
at de.laures.cewolf.taglib.ChartImageDefinition.ensureRendered(ChartImageDefinition.java:137)
at de.laures.cewolf.taglib.ChartImageDefinition.getSize(ChartImageDefinition.java:146)
at de.laures.cewolf.CewolfRenderer.doGet(CewolfRenderer.java:153)

kingcu
Posts: 3
Joined: Mon Oct 09, 2006 2:15 pm

Post by kingcu » Thu Nov 09, 2006 3:44 pm

Just got my problem fixed, it's because JFreeChart calls Java2D, which requires a display environment, which is not available on the Linux server. So, I changed the batch file to add -Djava.awt.headless=true to tell JVM to use a headless display. See below link for details:

http://java.sun.com/products/java-media ... n_that_rea

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 » Fri Nov 10, 2006 10:59 am

This is listed in the FAQ:

http://www.jfree.org/jfreechart/faq.html
David Gilbert
JFreeChart Project Leader

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

Locked