Hi,
I get a nullPointerException on trying to draw a
CombinedDomainXYPlot with a subplot of type: XYPlot,
2 datasets type: TimeSeriesCollection
1 Range Axis type: NumberAxis
I've succesfuly drawn multiple series with shared RangeAxis with the same setup as above, the only differences being:
XYSeriesCollection instead of TimeSeriesCollection
In the problematic case the combinedPlot is being serialized/deserialized over the web and then drawn on the applet.
The test case that works, all happens localy.
I can send more details as needed.
Any help appreciated.
Thanks
Stelios
Multiple series - shared RangeAxis
ok I now have the demo (the one that runs locally)
and the "real" app (the one which the plot gets serialized/deserialized)
to be exactly the same, same number and types of combinedPlot, subplot, datasets, range etc. The only difference being the size of the series and the modCount of the subplot ArrayList which in the "demo" version is 1 and in the "real" is 0. As fas as I understand this is because the object I get upon deserialization doesn't detect a change in the subplot ArrayList.
The demo still works while the other fails. Is there any issue with serialization that is causing this?
and the "real" app (the one which the plot gets serialized/deserialized)
to be exactly the same, same number and types of combinedPlot, subplot, datasets, range etc. The only difference being the size of the series and the modCount of the subplot ArrayList which in the "demo" version is 1 and in the "real" is 0. As fas as I understand this is because the object I get upon deserialization doesn't detect a change in the subplot ArrayList.
The demo still works while the other fails. Is there any issue with serialization that is causing this?
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Can you post the full stack trace? The serialization should work as far as I know...some code to reproduce the error would be excellent.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Stacktrace
here is the stacktrace: I'll try to make a dame asap.
I still believe there is some error somewhere in my code. The thing that I can't understand though is that in the debugger the plot seems identical...
After the deserialization that is.
Thanks
Stelios
Code: Select all
Exception in thread "AWT-EventQueue-13" java.lang.NullPointerException
at org.jfree.chart.renderer.xy.XYLineAndShapeRenderer.drawPrimaryLine(XYLineAndShapeRenderer.java:879)
at org.jfree.chart.renderer.xy.XYLineAndShapeRenderer.drawItem(XYLineAndShapeRenderer.java:785)
at org.jfree.chart.plot.XYPlot.render(XYPlot.java:2627)
at org.jfree.chart.plot.XYPlot.draw(XYPlot.java:2205)
at org.jfree.chart.plot.CombinedDomainXYPlot.draw(CombinedDomainXYPlot.java:453)
at org.jfree.chart.JFreeChart.draw(JFreeChart.java:1058)
at org.jfree.chart.ChartPanel.paintComponent(ChartPanel.java:1274)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
After the deserialization that is.
Thanks
Stelios
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Which version of JFreeChart? (I'm trying to match up the line numbers in the stack trace).
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

