andrey_nado Posted April 24, 2009 Share Posted April 24, 2009 I'm using file virtualization, which involves serialization of JasperPrint object's content. Also I'm using chart customizers and my customizer classes extends JRAbstractChartCustomizer class. I have questions:1) Why JRAbstractChartCustomizer is not serializable? I have to create my own customizer superclass which implements java.io.Serializable.2) After deserialization fields filler and chartDataset are both null and I lose access to report parameters/variables/fields. Is there any workaround to fix this?Thank you for your great work. Link to comment Share on other sites More sharing options...
lucianc Posted April 27, 2009 Share Posted April 27, 2009 Chart customizers are not meant to be serialized, at least not the ones that extend JRAbstractChartCustomizer.So the question is why it needs to be serialized in your case. I assume that you somehow inject a reference to the customizer in the JFreeChart object that it customizes. You should change this to fix the serialization problem.Regards,Lucian Link to comment Share on other sites More sharing options...
andrey_nado Posted April 28, 2009 Author Share Posted April 28, 2009 > Chart customizers are not meant to be serializedWhen I'm using file virtualizer, report pages are serialized/deserialized with all their content including customizers, aren't they?Post Edited by andrey_nado at 04/28/2009 17:36 Link to comment Share on other sites More sharing options...
dnvsrikanth Posted April 29, 2009 Share Posted April 29, 2009 Hi, I too have an issue regarding this, When I use the GradiantPaint in the chart customizer in reports. Do we need to make use of Serializable interface while generating the custom jars? Thanks,DNV Srikanth Link to comment Share on other sites More sharing options...
Teodor Danciu Posted April 30, 2009 Share Posted April 30, 2009 Hi, Not sure what you mean by custom jars, but what I can tell you is that you have to make sure that everything you set on the JFreeChart object that you customize, must be serializable, because the JFreeChart and all its content gets serialized. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
lucianc Posted May 4, 2009 Share Posted May 4, 2009 andrey_nadoWrote: > Chart customizers are not meant to be serialized When I'm using file virtualizer, report pages are serialized/deserialized with all their content including customizers, aren't they? Not by default. Only if you somehow include a reference to the customizer in the JFreeChart instance passed to the customize() method.Regards,Lucian Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now