Problem using JFreeChart in JBoss

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Rag Dai
Posts: 1
Joined: Fri Mar 16, 2012 9:32 pm
antibot: No, of course not.

Problem using JFreeChart in JBoss

Post by Rag Dai » Fri Mar 16, 2012 9:39 pm

Hi,

When i run my JFreeChart Standalone application it is working fine but when i deploy in JBoss, Server is shuttingdown or explicit kill on performing ChartFactory.createXYLineChart.

Server Log:-
--------------
"X connection to localhost:17.0 broken (explicit kill or server shutdown)."

public void buildChart() throws Exception {
XYSeriesCollection dataset = new XYSeriesCollection();
XYSeries xySeries = new XYSeries( "Park 1" );
xySeries.add( 1, 10 );
xySeries.add( 2, 4 );
xySeries.add( 3, 6 );
xySeries.add( 4, 12 );
xySeries.add( 5, 11 );
xySeries.add( 6, 29 );
xySeries.add( 7, 33 );

XYSeries xySeries2 = new XYSeries( "Park 2" );
xySeries2.add( 1, 23 );
xySeries2.add( 2, 15 );
xySeries2.add( 3, 18 );
xySeries2.add( 4, 5 );
xySeries2.add( 5, 52 );
xySeries2.add( 6, 66 );
xySeries2.add( 7, 83 );

dataset.addSeries( xySeries );
dataset.addSeries( xySeries2 );
log.info("before 3 - ");
JFreeChart chart = ChartFactory.createXYLineChart( "Park Chart",
"Day",
"# of Visitors",
dataset,
PlotOrientation.VERTICAL,
true,
false,
false );
log.info("before 4 - ");
FileOutputStream out = new FileOutputStream( new File( "/data/matlab/optimizer/taa/chart.jpg" ) );
ChartUtilities.writeChartAsPNG( out, chart, 400, 200 );

}


Note:- before 3 - is printing is log

Locked