NullPointerException when exporting chart as XML

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
Olexiy Strashko
Newbie
Newbie
Posts: 4
Joined: Fri Apr 24, 2009 12:00 am

NullPointerException when exporting chart as XML

Post by Olexiy Strashko » Tue May 26, 2009 2:07 pm

Hi,

I do need to serialize/deserialize chart in xml format.
When I do export, using ChartEditor, I have this exception raised:

Code: Select all

java.lang.NullPointerException
	at com.steema.teechart.Aspect.getTextSmooth(Aspect.java:225)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:36)
	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:243)
	at java.beans.Statement.invoke(Statement.java:215)
	at java.beans.Expression.getValue(Expression.java:98)
	at java.beans.DefaultPersistenceDelegate.doProperty(DefaultPersistenceDelegate.java:215)
	at java.beans.DefaultPersistenceDelegate.initBean(DefaultPersistenceDelegate.java:251)
	at java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDelegate.java:395)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:100)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeExpression(Encoder.java:259)
	at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:369)
	at java.beans.DefaultPersistenceDelegate.doProperty(DefaultPersistenceDelegate.java:216)
	at java.beans.DefaultPersistenceDelegate.initBean(DefaultPersistenceDelegate.java:251)
	at java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDelegate.java:395)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:100)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeExpression(Encoder.java:259)
	at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:369)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:97)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeObject1(Encoder.java:186)
	at java.beans.Encoder.cloneStatement(Encoder.java:199)
	at java.beans.Encoder.writeStatement(Encoder.java:230)
	at java.beans.XMLEncoder.writeStatement(XMLEncoder.java:328)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:257)
	at com.steema.teechart.exports.Exports$TemplateExport.toXML(Exports.java:305)
	at com.steema.teechart.exports.Exports$TemplateExport.toXML(Exports.java:248)
	at com.steema.teechart.exports.Exports$TemplateExport.toXML(Exports.java:237)
	at com.steema.teechart.editors.export.ExportPanel.saveTemplate(ExportPanel.java:512)
	at com.steema.teechart.editors.export.ExportPanel.bSave_actionPerformed(ExportPanel.java:477)
	at com.steema.teechart.editors.export.ExportEditor_bSave_actionAdapter.actionPerformed(ExportPanel.java:878)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
	at java.awt.Component.processMouseEvent(Component.java:5517)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
	at java.awt.Component.processEvent(Component.java:5282)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3984)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1791)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
	at java.awt.Dialog$1.run(Dialog.java:535)
	at java.awt.Dialog$2.run(Dialog.java:565)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.Dialog.show(Dialog.java:563)
	at java.awt.Component.show(Component.java:1302)
	at java.awt.Component.setVisible(Component.java:1255)
	at com.steema.teechart.editors.ChartEditor.editChart(ChartEditor.java:107)
	at com.steema.teechart.editors.ChartEditor.editChart(ChartEditor.java:102)
	at com.altio.controls.chart.demo.TeeChartRadar.backgroundClicked(TeeChartRadar.java:141)
	at com.steema.teechart.TChart.fireChartClicked(TChart.java:142)
	at com.steema.teechart.TChart.checkBackground(TChart.java:695)
	at com.steema.teechart.Chart.mousePressed(Chart.java:1208)
	at com.steema.teechart.TChart.processMouseEvent(TChart.java:1347)
	at java.awt.Component.processEvent(Component.java:5282)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3984)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3889)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1791)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
java.lang.InstantiationException: com.steema.teechart.drawing.StringAlignment
	at java.lang.Class.newInstance0(Class.java:335)
	at java.lang.Class.newInstance(Class.java:303)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:36)
	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:243)
	at java.beans.Statement.invoke(Statement.java:215)
	at java.beans.Expression.getValue(Expression.java:98)
	at java.beans.Encoder.getValue(Encoder.java:85)
	at java.beans.Encoder.get(Encoder.java:180)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:94)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeExpression(Encoder.java:259)
	at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:369)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:97)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeExpression(Encoder.java:259)
	at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:369)
	at java.beans.DefaultPersistenceDelegate.doProperty(DefaultPersistenceDelegate.java:216)
	at java.beans.DefaultPersistenceDelegate.initBean(DefaultPersistenceDelegate.java:251)
	at java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDelegate.java:395)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:100)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeExpression(Encoder.java:259)
	at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:369)
	at java.beans.DefaultPersistenceDelegate.doProperty(DefaultPersistenceDelegate.java:216)
	at java.beans.DefaultPersistenceDelegate.initBean(DefaultPersistenceDelegate.java:251)
	at java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDelegate.java:395)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:100)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeExpression(Encoder.java:259)
	at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:369)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:97)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeExpression(Encoder.java:259)
	at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:369)
	at java.beans.DefaultPersistenceDelegate.doProperty(DefaultPersistenceDelegate.java:216)
	at java.beans.DefaultPersistenceDelegate.initBean(DefaultPersistenceDelegate.java:251)
	at java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDelegate.java:395)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:100)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeExpression(Encoder.java:259)
	at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:369)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:97)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeObject1(Encoder.java:186)
	at java.beans.Encoder.cloneStatement(Encoder.java:199)
	at java.beans.Encoder.writeStatement(Encoder.java:230)
	at java.beans.XMLEncoder.writeStatement(XMLEncoder.java:328)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:257)
	at com.steema.teechart.exports.Exports$TemplateExport.toXML(Exports.java:305)
	at com.steema.teechart.exports.Exports$TemplateExport.toXML(Exports.java:248)
	at com.steema.teechart.exports.Exports$TemplateExport.toXML(Exports.java:237)
	at com.steema.teechart.editors.export.ExportPanel.saveTemplate(ExportPanel.java:512)
	at com.steema.teechart.editors.export.ExportPanel.bSave_actionPerformed(ExportPanel.java:477)
	at com.steema.teechart.editors.export.ExportEditor_bSave_actionAdapter.actionPerformed(ExportPanel.java:878)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
	at java.awt.Component.processMouseEvent(Component.java:5517)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
	at java.awt.Component.processEvent(Component.java:5282)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3984)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1791)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
	at java.awt.Dialog$1.run(Dialog.java:535)
	at java.awt.Dialog$2.run(Dialog.java:565)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.Dialog.show(Dialog.java:563)
	at java.awt.Component.show(Component.java:1302)
	at java.awt.Component.setVisible(Component.java:1255)
	at com.steema.teechart.editors.ChartEditor.editChart(ChartEditor.java:107)
	at com.steema.teechart.editors.ChartEditor.editChart(ChartEditor.java:102)
	at com.altio.controls.chart.demo.TeeChartRadar.backgroundClicked(TeeChartRadar.java:141)
	at com.steema.teechart.TChart.fireChartClicked(TChart.java:142)
	at com.steema.teechart.TChart.checkBackground(TChart.java:695)
	at com.steema.teechart.Chart.mousePressed(Chart.java:1208)
	at com.steema.teechart.TChart.processMouseEvent(TChart.java:1347)
	at java.awt.Component.processEvent(Component.java:5282)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3984)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3889)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1791)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
java.lang.RuntimeException: failed to evaluate: <unbound>=Class.new();
	at java.beans.Encoder.getValue(Encoder.java:89)
	at java.beans.Encoder.get(Encoder.java:180)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:94)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeExpression(Encoder.java:259)
	at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:369)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:97)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeExpression(Encoder.java:259)
	at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:369)
	at java.beans.DefaultPersistenceDelegate.doProperty(DefaultPersistenceDelegate.java:216)
	at java.beans.DefaultPersistenceDelegate.initBean(DefaultPersistenceDelegate.java:251)
	at java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDelegate.java:395)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:100)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeExpression(Encoder.java:259)
	at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:369)
	at java.beans.DefaultPersistenceDelegate.doProperty(DefaultPersistenceDelegate.java:216)
	at java.beans.DefaultPersistenceDelegate.initBean(DefaultPersistenceDelegate.java:251)
	at java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDelegate.java:395)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:100)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeExpression(Encoder.java:259)
	at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:369)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:97)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeExpression(Encoder.java:259)
	at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:369)
	at java.beans.DefaultPersistenceDelegate.doProperty(DefaultPersistenceDelegate.java:216)
	at java.beans.DefaultPersistenceDelegate.initBean(DefaultPersistenceDelegate.java:251)
	at java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDelegate.java:395)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:100)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeExpression(Encoder.java:259)
	at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:369)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:97)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeObject1(Encoder.java:186)
	at java.beans.Encoder.cloneStatement(Encoder.java:199)
	at java.beans.Encoder.writeStatement(Encoder.java:230)
	at java.beans.XMLEncoder.writeStatement(XMLEncoder.java:328)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:257)
	at com.steema.teechart.exports.Exports$TemplateExport.toXML(Exports.java:305)
	at com.steema.teechart.exports.Exports$TemplateExport.toXML(Exports.java:248)
	at com.steema.teechart.exports.Exports$TemplateExport.toXML(Exports.java:237)
	at com.steema.teechart.editors.export.ExportPanel.saveTemplate(ExportPanel.java:512)
	at com.steema.teechart.editors.export.ExportPanel.bSave_actionPerformed(ExportPanel.java:477)
	at com.steema.teechart.editors.export.ExportEditor_bSave_actionAdapter.actionPerformed(ExportPanel.java:878)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
	at java.awt.Component.processMouseEvent(Component.java:5517)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
	at java.awt.Component.processEvent(Component.java:5282)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3984)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1791)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
	at java.awt.Dialog$1.run(Dialog.java:535)
	at java.awt.Dialog$2.run(Dialog.java:565)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.Dialog.show(Dialog.java:563)
	at java.awt.Component.show(Component.java:1302)
	at java.awt.Component.setVisible(Component.java:1255)
	at com.steema.teechart.editors.ChartEditor.editChart(ChartEditor.java:107)
	at com.steema.teechart.editors.ChartEditor.editChart(ChartEditor.java:102)
	at com.altio.controls.chart.demo.TeeChartRadar.backgroundClicked(TeeChartRadar.java:141)
	at com.steema.teechart.TChart.fireChartClicked(TChart.java:142)
	at com.steema.teechart.TChart.checkBackground(TChart.java:695)
	at com.steema.teechart.Chart.mousePressed(Chart.java:1208)
	at com.steema.teechart.TChart.processMouseEvent(TChart.java:1347)
	at java.awt.Component.processEvent(Component.java:5282)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3984)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3889)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1791)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
java.lang.NoSuchMethodException: <unbound>=Area.getTreatNulls();
	at java.beans.Statement.invoke(Statement.java:236)
	at java.beans.Expression.getValue(Expression.java:98)
	at java.beans.DefaultPersistenceDelegate.doProperty(DefaultPersistenceDelegate.java:214)
	at java.beans.DefaultPersistenceDelegate.initBean(DefaultPersistenceDelegate.java:251)
	at java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDelegate.java:395)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:100)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeExpression(Encoder.java:259)
	at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:369)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:97)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeObject1(Encoder.java:186)
	at java.beans.Encoder.cloneStatement(Encoder.java:199)
	at java.beans.Encoder.writeStatement(Encoder.java:230)
	at java.beans.XMLEncoder.writeStatement(XMLEncoder.java:328)
	at java.beans.DefaultPersistenceDelegate.invokeStatement(DefaultPersistenceDelegate.java:239)
	at java.beans.java_util_List_PersistenceDelegate.initialize(MetaData.java:247)
	at java.beans.PersistenceDelegate.initialize(PersistenceDelegate.java:190)
	at java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDelegate.java:393)
	at java.beans.PersistenceDelegate.initialize(PersistenceDelegate.java:190)
	at java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDelegate.java:393)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:100)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeExpression(Encoder.java:259)
	at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:369)
	at java.beans.DefaultPersistenceDelegate.doProperty(DefaultPersistenceDelegate.java:216)
	at java.beans.DefaultPersistenceDelegate.initBean(DefaultPersistenceDelegate.java:251)
	at java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDelegate.java:395)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:100)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeExpression(Encoder.java:259)
	at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:369)
	at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:97)
	at java.beans.Encoder.writeObject(Encoder.java:54)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:254)
	at java.beans.Encoder.writeObject1(Encoder.java:186)
	at java.beans.Encoder.cloneStatement(Encoder.java:199)
	at java.beans.Encoder.writeStatement(Encoder.java:230)
	at java.beans.XMLEncoder.writeStatement(XMLEncoder.java:328)
	at java.beans.XMLEncoder.writeObject(XMLEncoder.java:257)
	at com.steema.teechart.exports.Exports$TemplateExport.toXML(Exports.java:305)
	at com.steema.teechart.exports.Exports$TemplateExport.toXML(Exports.java:248)
	at com.steema.teechart.exports.Exports$TemplateExport.toXML(Exports.java:237)
	at com.steema.teechart.editors.export.ExportPanel.saveTemplate(ExportPanel.java:512)
	at com.steema.teechart.editors.export.ExportPanel.bSave_actionPerformed(ExportPanel.java:477)
	at com.steema.teechart.editors.export.ExportEditor_bSave_actionAdapter.actionPerformed(ExportPanel.java:878)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
	at java.awt.Component.processMouseEvent(Component.java:5517)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
	at java.awt.Component.processEvent(Component.java:5282)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3984)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1791)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
	at java.awt.Dialog$1.run(Dialog.java:535)
	at java.awt.Dialog$2.run(Dialog.java:565)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.Dialog.show(Dialog.java:563)
	at java.awt.Component.show(Component.java:1302)
	at java.awt.Component.setVisible(Component.java:1255)
	at com.steema.teechart.editors.ChartEditor.editChart(ChartEditor.java:107)
	at com.steema.teechart.editors.ChartEditor.editChart(ChartEditor.java:102)
	at com.altio.controls.chart.demo.TeeChartRadar.backgroundClicked(TeeChartRadar.java:141)
	at com.steema.teechart.TChart.fireChartClicked(TChart.java:142)
	at com.steema.teechart.TChart.checkBackground(TChart.java:695)
	at com.steema.teechart.Chart.mousePressed(Chart.java:1208)
	at com.steema.teechart.TChart.processMouseEvent(TChart.java:1347)
	at java.awt.Component.processEvent(Component.java:5282)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3984)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3889)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1791)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
This also reproduces on the standard TChart 2 demo applet.

Can you please help me and look into this problem, it is quite critical for our application?

Thanks in advance,

Olexiy.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue May 26, 2009 2:36 pm

Hi Olexiy,

I've been able to reproduce the issue here and added it (TJ71014185) to the defect list to be fixed for next releases. In the meantime you could try if code below works fine at your end.

Code: Select all

        try {
            tChart1.getExport().getTemplate().toXML("c:\\temp\\e1.xml");
        } catch(FileNotFoundException e) {
            e.printStackTrace();
        }
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Olexiy Strashko
Newbie
Newbie
Posts: 4
Joined: Fri Apr 24, 2009 12:00 am

Post by Olexiy Strashko » Tue May 26, 2009 4:28 pm

narcis wrote:Hi Olexiy,

I've been able to reproduce the issue here and added it (TJ71014185) to the defect list to be fixed for next releases. In the meantime you could try if code below works fine at your end.

Code: Select all

        try {
            tChart1.getExport().getTemplate().toXML("c:\\temp\\e1.xml");
        } catch(FileNotFoundException e) {
            e.printStackTrace();
        }
Hi Narcis,

Thanks for reply.

Your code works, but seems that because of exception - not all properties are serialized, and after deserialization I get the different chart, comparing to initial one.
This is not applicable for production use.

Is it possible to know the release planning and specially release date which will include this fix?

Thanks in advance.

Olexiy.

Marc
Site Admin
Site Admin
Posts: 1272
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Fri May 29, 2009 10:57 am

Hello Olexiy,

We're looking at this, we don't have a fix-date for it yet. Are you able to use standard serialisation in the meantime?

eg.

Code: Select all

tChart1.getExport().getTemplate().toFile
Regards,
Marc Meumann
Steema Support

Marc
Site Admin
Site Admin
Posts: 1272
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Fri May 29, 2009 3:25 pm

Hello Olexy,

There are some outstanding issues with use of the native (standard Java) XMLEncoder and TeeChart. An alternative component that you might find acceptable for your XML export needs is XStream, an open source component that tests well when used with TeeChart. See http://xstream.codehaus.org/index.html.

TeeChart may be exported and imported in the following way using the XStream component:

Export

Code: Select all

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {
  try {
    BufferedOutputStream stream = new BufferedOutputStream(
              new FileOutputStream("c:\\temp\\xStreamChart.xml"));

    XStream xStream = new XStream();
    xStream.toXML(tChart1.getChart(), stream);

    try {
      stream.close();
    } catch(IOException e) {
      e.printStackTrace();
    }
  } catch(FileNotFoundException e) {
      e.printStackTrace();
  }
}
Import

Code: Select all

private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {
  try {
      BufferedInputStream stream = new BufferedInputStream(
              new FileInputStream("c:\\temp\\xStreamChart.xml"));

      XStream xStream = new XStream();

      tChart1.setChart((Chart)xStream.fromXML(stream));
      tChart1.refreshControl();

    try {
      stream.close();
    } catch(IOException e) {
      e.printStackTrace();
    }
  } catch(FileNotFoundException e) {
      e.printStackTrace();
  }
}
We will run further tests here to see whether the issues relating to use of the standard XMLEncoder can be resolved. Please remember too that TeeChart's native, non-XML export remains an alternative option.

Regards,
Marc
Steema Support

Post Reply