Hi Kelvin and Erich, I just debugged through this, and it's definitely a bug in the change summary code. It's another one in the line of bugs we've been finding related to the change we made when we separated SDO user properties from the internal EMF ones. It's another example of where the wrong index (SDO property index) is being used when it should be the internal EMF feature index. I'll look at it a little more tomorrow to figure out what the cleanest fix is.
Frank. Erich Rueede <[EMAIL PROTECTED]> 07/09/2007 08:45 AM Please respond to [email protected] To [email protected], [EMAIL PROTECTED] cc Subject Re: static DataObject with contained static DataGraph doesn't record changes in summary Hi Kelvin I did not get the exception you mentioned. I guess this might be due to different versions of the SDO/EMF implementation we are using. Regards, Erich --- kelvin goodson <[EMAIL PROTECTED]> wrote: > Hi Erich, > I'm looking at this but currently I am getting an > exception generated > here ... > > saveGraph(staticGraph); > > I'll investigate why this might be. Have you seen > anything like this? I > noticed I had to do some changes to your code to > make it compile, which > implies you are using some generator options. For > completeness, can you let > me know what generator options you are using. > > Regards, Kelvin. > > **************** static graph ********************** > > Exception in thread "main" > java.lang.IllegalStateException: The containment > feature could not be located > at > org.eclipse.emf.ecore.impl.BasicEObjectImpl.eContainmentFeature( > BasicEObjectImpl.java:475) > at > org.eclipse.emf.ecore.impl.BasicEObjectImpl.eContainmentFeature( > BasicEObjectImpl.java:439) > at > org.apache.tuscany.sdo.impl.DataObjectImpl.getContainmentProperty( > DataObjectImpl.java:182) > at > org.apache.tuscany.sdo.util.resource.ChangeSummaryStreamSerializer.saveChangeSummary > (ChangeSummaryStreamSerializer.java:609) > at > org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLSaveImpl.saveChangeSummary > (SDOXMLResourceImpl.java:806) > at > org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLSaveImpl.saveDataTypeElementSingle > (SDOXMLResourceImpl.java:816) > at > org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures( > XMLSaveImpl.java:1370) > at > org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID( > XMLSaveImpl.java:2462) > at > org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement( > XMLSaveImpl.java:1036) > at > org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement( > XMLSaveImpl.java:922) > at > org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLSaveImpl.saveElementFeatureMap > (SDOXMLResourceImpl.java:844) > at > org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures( > XMLSaveImpl.java:1355) > at > org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeTopObject( > XMLSaveImpl.java:627) > at > org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.traverse(XMLSaveImpl.java > :552) > at > org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:233) > at > org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave( > XMLResourceImpl.java:203) > at > org.eclipse.emf.ecore.resource.impl.ResourceImpl.save( > ResourceImpl.java:993) > at > org.apache.tuscany.sdo.helper.XMLDocumentImpl.save( > XMLDocumentImpl.java:205) > at > org.apache.tuscany.sdo.helper.XMLDocumentImpl.save( > XMLDocumentImpl.java:159) > at > org.apache.tuscany.sdo.helper.XMLHelperImpl.save(XMLHelperImpl.java > :139) > at > org.apache.tuscany.sdo.helper.XMLHelperImpl.save(XMLHelperImpl.java > :134) > at > t_user.erich_rueede.DgExtended.saveGraph(DgExtended.java:69) > at > t_user.erich_rueede.DgExtended.main(DgExtended.java:42) > > > > On 07/07/07, Erich Rueede <[EMAIL PROTECTED]> wrote: > > > > Hi Frank and Kelvin > > > > since I don't know how to make attachments work > for > > the mailing list, here's a text copy of its > content: > > > > The XSD: > > ======== > > <xsd:schema > xmlns="http://www.w3.org/2001/XMLSchema" > > targetNamespace="http://abc.com/services" > > xmlns:tns="http://abc.com/services" > > xmlns:sdo="commonj.sdo" > > xmlns:sdoJava="commonj.sdo/java" > > xmlns:sdoXml="commonj.sdo/xml" > > sdoJava:package="com.abc.services" > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > > > > <xsd:import namespace="commonj.sdo" > > schemaLocation="datagraph.xsd" /> > > > > <xsd:complexType name="NestedType"> > > <xsd:sequence> > > > <xsd:element name="test1" > > type="xsd:string" /> > > > <xsd:element name="test2" > > type="xsd:string" /> > > </xsd:sequence> > > </xsd:complexType> > > > > <xsd:complexType name="MyDataGraph"> > > <complexContent> > > <extension > base="sdo:BaseDataGraphType"> > > <xsd:sequence> > > > <xsd:element > > name="NestedType" > > type="tns:NestedType" /> > > </xsd:sequence> > > </extension> > > </complexContent> > > </xsd:complexType> > > > > <xsd:complexType name="Input"> > > <xsd:sequence> > > <xsd:element name="MyDataGraph" > > type="tns:MyDataGraph"/> > > </xsd:sequence> > > </xsd:complexType> > > </xsd:schema> > > > > The Java Test: > > ============== > > > > package com.abc.services; > > > > import java.io.ByteArrayOutputStream; > > import java.io.IOException; > > > > import org.apache.tuscany.sdo.util.SDOUtil; > > > > import com.abc.services.impl.TestFactoryImpl; > > import commonj.sdo.DataGraph; > > import commonj.sdo.DataObject; > > import commonj.sdo.Type; > > import commonj.sdo.helper.XMLHelper; > > import commonj.sdo.impl.HelperProvider; > > > > > > public class TestABC { > > > > public static void main(String[] args) { > > > > > > > TestFactory.INSTANCE.register(HelperProvider.getDefaultContext()); > > NestedType nested; > > > > System.out.println("**************** > static > > graph **********************\n"); > > > > Input input = > > TestFactory.INSTANCE.createInput(); > > > > MyDataGraph staticGraph = > > TestFactory.INSTANCE.createMyDataGraph(); > > nested = > > TestFactory.INSTANCE.createNestedType(); > > staticGraph.setNestedType(nested); > > ((DataObject)nested).set("test1", > "test1"); > > ((DataObject)nested).set("test2", > "test2"); > > > staticGraph.getChangeSummary().beginLogging(); > > ((DataObject)nested).set("test2", > > "test2_modified"); > > nested.setTest1("test1_modified"); > > > > input.setMyDataGraph(staticGraph); > > > > saveGraph(staticGraph); > === message truncated === ____________________________________________________________________________________ Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
