Concurrency problem with CategoryItemLabelGenerator

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
sakaray_c
Posts: 31
Joined: Mon Dec 22, 2003 11:35 am

Concurrency problem with CategoryItemLabelGenerator

Post by sakaray_c » Wed Mar 10, 2004 6:32 am

Hi,

I am using CategoryItemLabelGenerator for generating custom labels for bar charts. I am getting labels.

But it is giving exception when more than one user access at a time.
It is giving java.lang.NullPointerException (or) java.lang.ArrayIndexOutOfBoundsException
at generateItemLabel() method.

Can u pls tell me whats wrong.

Thanks and Regards,
sakaray_c

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 10, 2004 3:24 pm

Can you supply the complete exception text and some info about how you construct your charts? There may be a problem in that the NumberFormat and DateFormat objects used by the label generator are not thread-safe - and JFreeChart isn't doing anything to externally synchronise them.
David Gilbert
JFreeChart Project Leader

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

Locked