You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "ant elder (JIRA)" <de...@tuscany.apache.org> on 2011/08/20 09:39:27 UTC
[jira] [Updated] (TUSCANY-3403) ClassCastException when adding
elements to list-valued property when ChangeSummary is switched on
[ https://issues.apache.org/jira/browse/TUSCANY-3403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ant elder updated TUSCANY-3403:
-------------------------------
Fix Version/s: Java-SDO-Next
> ClassCastException when adding elements to list-valued property when ChangeSummary is switched on
> -------------------------------------------------------------------------------------------------
>
> Key: TUSCANY-3403
> URL: https://issues.apache.org/jira/browse/TUSCANY-3403
> Project: Tuscany
> Issue Type: Bug
> Components: Java SDO Implementation
> Affects Versions: Java-SDO-1.1
> Reporter: Sören Balko
> Fix For: Java-SDO-Next
>
>
> Hi!
> I have observed a ClassCastException (see below) that occurs when using change tracking (i.e., the ChangeSummary) feature of a data graph. Specifically, I have a root object "R" in that data graph which contains a list of other data objects ("flowElement"). The nodes, in turn, do have another property "outgoing" holding a list of strings. I have initially (w/o change tracking) created the root object of the DataGraph and added a first data object n1 to the "flowElement" list. Then, I switch on change tracking (using the ChangeSummary instance from the DataGraph) and create another data object n2 which also gets added to the "flowElement" list. Afterwards, both the root object and n2 are returned by ChangeSummary.getChangedDataObject(). When I then try to add a string to the (hitherto empty) n1.outgoing list, I get the exception below.
> Please note that adding the string to n1.outgoing works fine when (1) either change tracking is completely switched off or (2) change tracking is switched on BEFORE n1 is created. What is also worth mentioning is that I am using static data types which are generated from an XSD schema (specifically, the BPMN 2.0 XSD files, see http://www.omg.org/spec/BPMN/2.0/).
> Thank you very much for having a look into that issue. I am happy to provide further details, if required.
> Cheers,
> Sören
>
> java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Collection
> at org.eclipse.emf.ecore.change.util.ChangeRecorder.handleFeature(ChangeRecorder.java:428)
> at org.eclipse.emf.ecore.change.util.ChangeRecorder.notifyChanged(ChangeRecorder.java:312)
> at org.apache.tuscany.sdo.impl.ChangeSummaryImpl$SDOChangeRecorder.notifyChanged(ChangeSummaryImpl.java:486)
> at org.apache.tuscany.sdo.impl.DataObjectImpl.eNotify(DataObjectImpl.java:1374)
> at org.eclipse.emf.ecore.util.EcoreEList.dispatchNotification(EcoreEList.java:234)
> at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:302)
> at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:600)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira