Tuscany
  1. Tuscany
  2. TUSCANY-832

Needs to support serialization and deserialization of SDO URI type property that references a DataObject in a different tree

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Java-SDO-Next
    • Fix Version/s: Java-SDO-Next
    • Labels:
      None

      Description

      The XSD anyURI type is mapped to SDO URI type with sdo:propertyType annotation. When I used the SDO URI type property to reference a DataObject in a different tree and tried to serialize it, I would get the exception below.

      Exception in thread "main" org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The object 'org.apache.tuscany.sdo.impl.DynamicDataObjectImpl@1e344fe3 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@5c80fe3 (name: Person) (instanceClassName: null) (abstract: false, interface: false))' is not contained in a resource.
      at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.endSave(XMLSaveImpl.java:284)
      at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:247)
      at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:203)
      at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:988)
      at org.apache.tuscany.sdo.helper.XMLDocumentImpl.save(XMLDocumentImpl.java:183)
      at org.apache.tuscany.sdo.helper.XMLHelperImpl.save(XMLHelperImpl.java:107)
      at org.apache.tuscany.sdo.helper.XMLHelperImpl.save(XMLHelperImpl.java:102)
      at AnyURITest.testAnySimpleType(AnyURITest.java:45)
      at AnyURITest.main(AnyURITest.java:29)
      Caused by: org.eclipse.emf.ecore.xmi.DanglingHREFException: The object 'org.apache.tuscany.sdo.impl.DynamicDataObjectImpl@1e344fe3 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@5c80fe3 (name: Person) (instanceClassName: null) (abstract: false, interface: false))' is not contained in a resource.
      at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.handleDanglingHREF(XMLHelperImpl.java:680)
      at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getHREF(XMLHelperImpl.java:711)
      at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementReference(XMLSaveImpl.java:1874)
      at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementReferenceSingle(XMLSaveImpl.java:1917)
      at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLSaveImpl.java:1420)
      at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XMLSaveImpl.java:2458)
      at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSaveImpl.java:1032)
      at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSaveImpl.java:918)
      at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementFeatureMap(XMLSaveImpl.java:2208)
      at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLSaveImpl.java:1351)
      at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeTopObject(XMLSaveImpl.java:624)
      at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.traverse(XMLSaveImpl.java:549)
      at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:233)
      ... 7 more

      1. AnyURITest.java
        2 kB
        Fuhwei Lwo
      2. anyURI.xsd
        1 kB
        Fuhwei Lwo

        Activity

        Fuhwei Lwo created issue -
        Fuhwei Lwo made changes -
        Field Original Value New Value
        Attachment AnyURITest.java [ 12342817 ]
        Attachment anyURI.xsd [ 12342816 ]
        ant elder made changes -
        Affects Version/s Java-SDO-Mx [ 12312262 ]
        Affects Version/s Java-Mx [ 12311031 ]
        ant elder made changes -
        Fix Version/s Java-SDO-Mx [ 12312262 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Fuhwei Lwo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development