https://bz.apache.org/bugzilla/show_bug.cgi?id=60124
Bug ID: 60124 Summary: Strange ClassCastException when try to save test plan with TestBean GUI and collection properties (TableEditor) Product: JMeter Version: 3.0 Hardware: PC OS: Linux Status: NEW Severity: major Priority: P2 Component: Main Assignee: issues@jmeter.apache.org Reporter: alexander_ser...@mail.ru Created attachment 34242 --> https://bz.apache.org/bugzilla/attachment.cgi?id=34242&action=edit Log file when I try to save test plan Default.jmx in my plugin repository with added element in ConnectSampler.recycler collection JMeter versions: 3.0, 3.1-SNAPSHOT.20160831 I write a plug-in for JMeter and faced the strange problem when saving the my samplers My plug-in: https://bitbucket.org/Mingun/jmeter-atm/, branch `cassettes` I have tow samplers with autogenerated TestBean GUI. My samplers contains collection properties with TableEditor GUI. When I save test plan with samplers with filled there properties, strange ClassCastException is generated and test plan save go to broken state (because writing XML file just ended when exception raised). See exception at end of this report (in this case I add element in `ConnectSampler.recycler` collection ant try to save test plan). My samplers and their collection properties with problem: * ConnectSampler ** recycler (contains class CashUnit) ** acceptor (contains class CashUnit) ** dispenser (contains class CashUnit) ** hoppers (contains class CashUnit) * RequestSampler ** cashin (contains class Deposit) What is stranger, so is that such problem doesn't arise with the `RequestSampler.refines` collection though it contains the class `Refine`, similar on structure, absolutely not different from the class `Deposit`, except name and names of properties. One more strangeness is that on Windows I didn't manage to reproduce this bug, only on Ubuntu The exception can be avoided, only if to add to the test plan a new sampler (ConnectSampler in this case) with an empty collection property and before saving the plan to select it in a tree. --------------------------------------------- 2016/09/13 10:46:09 ERROR - jmeter.gui.action.Save: Error saving tree: java.lang.ClassCastException: ru.mingun.jmeter.protocol.xdc.devices.CashUnit cannot be cast to org.apache.jmeter.testelement.property.JMeterProperty at org.apache.jmeter.testelement.property.PropertyIteratorImpl.next(PropertyIteratorImpl.java:41) at org.apache.jmeter.testelement.property.PropertyIteratorImpl.next(PropertyIteratorImpl.java:24) at org.apache.jmeter.save.converters.MultiPropertyConverter.marshal(MultiPropertyConverter.java:57) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64) at org.apache.jmeter.save.converters.TestElementConverter.marshal(TestElementConverter.java:74) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64) at org.apache.jmeter.save.converters.HashTreeConverter.marshal(HashTreeConverter.java:53) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64) at org.apache.jmeter.save.converters.HashTreeConverter.marshal(HashTreeConverter.java:54) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64) at org.apache.jmeter.save.converters.HashTreeConverter.marshal(HashTreeConverter.java:54) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64) at org.apache.jmeter.save.converters.HashTreeConverter.marshal(HashTreeConverter.java:54) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88) at org.apache.jmeter.save.ScriptWrapperConverter.marshal(ScriptWrapperConverter.java:79) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1043) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1032) at com.thoughtworks.xstream.XStream.toXML(XStream.java:1005) at org.apache.jmeter.save.SaveService.saveTree(SaveService.java:304) at org.apache.jmeter.gui.action.Save.doAction(Save.java:225) at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:80) at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40) at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:62) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) 2016/09/13 10:46:09 ERROR - jmeter.gui.action.ActionRouter: Error processing org.apache.jmeter.gui.action.Save@6d469831 java.lang.ClassCastException: ru.mingun.jmeter.protocol.xdc.devices.CashUnit cannot be cast to org.apache.jmeter.testelement.property.JMeterProperty at org.apache.jmeter.testelement.property.PropertyIteratorImpl.next(PropertyIteratorImpl.java:41) at org.apache.jmeter.testelement.property.PropertyIteratorImpl.next(PropertyIteratorImpl.java:24) at org.apache.jmeter.save.converters.MultiPropertyConverter.marshal(MultiPropertyConverter.java:57) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64) at org.apache.jmeter.save.converters.TestElementConverter.marshal(TestElementConverter.java:74) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64) at org.apache.jmeter.save.converters.HashTreeConverter.marshal(HashTreeConverter.java:53) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64) at org.apache.jmeter.save.converters.HashTreeConverter.marshal(HashTreeConverter.java:54) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64) at org.apache.jmeter.save.converters.HashTreeConverter.marshal(HashTreeConverter.java:54) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64) at org.apache.jmeter.save.converters.HashTreeConverter.marshal(HashTreeConverter.java:54) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88) at org.apache.jmeter.save.ScriptWrapperConverter.marshal(ScriptWrapperConverter.java:79) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1043) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1032) at com.thoughtworks.xstream.XStream.toXML(XStream.java:1005) at org.apache.jmeter.save.SaveService.saveTree(SaveService.java:304) at org.apache.jmeter.gui.action.Save.doAction(Save.java:225) at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:80) at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40) at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:62) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) -- You are receiving this mail because: You are the assignee for the bug.