You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Fuhwei Lwo (JIRA)" <tu...@ws.apache.org> on 2007/02/21 17:37:05 UTC

[jira] Created: (TUSCANY-1132) SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject

SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject
----------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: TUSCANY-1132
                 URL: https://issues.apache.org/jira/browse/TUSCANY-1132
             Project: Tuscany
          Issue Type: Bug
          Components: Java SDO Implementation
    Affects Versions: Java-SDO-M3
            Reporter: Fuhwei Lwo
             Fix For: Java-SDO-M3


With or without the patch of TUSCANY-1131 to fix the problem in XMLDocumentImpl.java, this problem always exists. With the fix from TUSCANY-1131, now I got this exception. I believe there are still some problem in the SDO Java serialization/deserialization code.

org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:80)
	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:275)
	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:463)
	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:246)
	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:224)
	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:78)
	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:72)
	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:210)
	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:219)
	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
	at org.apache.tuscany.sdo.test.JavaSerializeDeserializeTestCase.testAnyTypeContainer(JavaSerializeDeserializeTestCase.java:70)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:615)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2418)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2403)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:1920)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1788)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1566)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1234)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1162)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1244)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:880)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:863)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:289)
	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:265)
	... 40 more
Caused by: java.lang.ClassCastException: The feature 'dataObject's type 'DataObject' does not permit a value of type 'DataObject'
	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
	at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
	at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
	at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
	at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1401)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1091)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2413)
	... 62 more



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1132) SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject

Posted by "Frank Budinsky (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475164 ] 

Frank Budinsky commented on TUSCANY-1132:
-----------------------------------------

Fuhwei.

1)  the writeDataObject(DataObject, ObjectOutput) method in the HelperProviderImpl should be called *once*.
2)  the XPath should be the path to the nested object, relative to the root object that gets serialized.

It this is not working, then I think the problem is in DataObjectUtil.getXPath(). What is it returning?

Frank.


> SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1132
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1132
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M3
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-M3
>
>         Attachments: tuscany-1132-testcase.patch
>
>
> With or without the patch of TUSCANY-1131 to fix the problem in XMLDocumentImpl.java, this problem always exists. With the fix from TUSCANY-1131, now I got this exception. I believe there are still some problem in the SDO Java serialization/deserialization code.
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:80)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:275)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:463)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:246)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:224)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:78)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:72)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:210)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:219)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.test.JavaSerializeDeserializeTestCase.testAnyTypeContainer(JavaSerializeDeserializeTestCase.java:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2418)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2403)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:1920)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1788)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1566)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1234)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1162)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1244)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:880)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:863)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:289)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:265)
> 	... 40 more
> Caused by: java.lang.ClassCastException: The feature 'dataObject's type 'DataObject' does not permit a value of type 'DataObject'
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1401)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1091)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2413)
> 	... 62 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-1132) SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject

Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kelvin Goodson updated TUSCANY-1132:
------------------------------------

    Patch Info: [Patch Available]

> SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1132
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1132
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M3
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-M3
>
>         Attachments: tuscany-1132-testcase.patch
>
>
> With or without the patch of TUSCANY-1131 to fix the problem in XMLDocumentImpl.java, this problem always exists. With the fix from TUSCANY-1131, now I got this exception. I believe there are still some problem in the SDO Java serialization/deserialization code.
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:80)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:275)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:463)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:246)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:224)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:78)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:72)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:210)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:219)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.test.JavaSerializeDeserializeTestCase.testAnyTypeContainer(JavaSerializeDeserializeTestCase.java:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2418)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2403)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:1920)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1788)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1566)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1234)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1162)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1244)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:880)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:863)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:289)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:265)
> 	... 40 more
> Caused by: java.lang.ClassCastException: The feature 'dataObject's type 'DataObject' does not permit a value of type 'DataObject'
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1401)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1091)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2413)
> 	... 62 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-1132) SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject

Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kelvin Goodson updated TUSCANY-1132:
------------------------------------

    Patch Info:   (was: [Patch Available])

patch is only currently for test case

> SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1132
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1132
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M3
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-M3
>
>         Attachments: tuscany-1132-testcase.patch
>
>
> With or without the patch of TUSCANY-1131 to fix the problem in XMLDocumentImpl.java, this problem always exists. With the fix from TUSCANY-1131, now I got this exception. I believe there are still some problem in the SDO Java serialization/deserialization code.
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:80)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:275)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:463)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:246)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:224)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:78)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:72)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:210)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:219)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.test.JavaSerializeDeserializeTestCase.testAnyTypeContainer(JavaSerializeDeserializeTestCase.java:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2418)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2403)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:1920)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1788)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1566)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1234)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1162)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1244)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:880)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:863)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:289)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:265)
> 	... 40 more
> Caused by: java.lang.ClassCastException: The feature 'dataObject's type 'DataObject' does not permit a value of type 'DataObject'
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1401)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1091)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2413)
> 	... 62 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Resolved: (TUSCANY-1132) SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject

Posted by "Frank Budinsky (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Budinsky resolved TUSCANY-1132.
-------------------------------------

    Resolution: Fixed

Fixed in revision 514020.


> SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1132
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1132
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M3
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-M3
>
>         Attachments: tuscany-1132-testcase.patch
>
>
> With or without the patch of TUSCANY-1131 to fix the problem in XMLDocumentImpl.java, this problem always exists. With the fix from TUSCANY-1131, now I got this exception. I believe there are still some problem in the SDO Java serialization/deserialization code.
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:80)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:275)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:463)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:246)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:224)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:78)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:72)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:210)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:219)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.test.JavaSerializeDeserializeTestCase.testAnyTypeContainer(JavaSerializeDeserializeTestCase.java:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2418)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2403)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:1920)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1788)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1566)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1234)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1162)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1244)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:880)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:863)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:289)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:265)
> 	... 40 more
> Caused by: java.lang.ClassCastException: The feature 'dataObject's type 'DataObject' does not permit a value of type 'DataObject'
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1401)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1091)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2413)
> 	... 62 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1132) SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject

Posted by "Frank Budinsky (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475183 ] 

Frank Budinsky commented on TUSCANY-1132:
-----------------------------------------

I think there should be an xsi:type on the root element: <sdo:dataObject xsi:type="envelope:Envelope" ... >, or something like that.

Does it work if the root element has registered metadata? What does the serialization look like in that case?

Frank.

> SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1132
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1132
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M3
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-M3
>
>         Attachments: tuscany-1132-testcase.patch
>
>
> With or without the patch of TUSCANY-1131 to fix the problem in XMLDocumentImpl.java, this problem always exists. With the fix from TUSCANY-1131, now I got this exception. I believe there are still some problem in the SDO Java serialization/deserialization code.
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:80)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:275)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:463)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:246)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:224)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:78)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:72)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:210)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:219)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.test.JavaSerializeDeserializeTestCase.testAnyTypeContainer(JavaSerializeDeserializeTestCase.java:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2418)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2403)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:1920)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1788)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1566)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1234)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1162)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1244)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:880)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:863)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:289)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:265)
> 	... 40 more
> Caused by: java.lang.ClassCastException: The feature 'dataObject's type 'DataObject' does not permit a value of type 'DataObject'
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1401)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1091)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2413)
> 	... 62 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1132) SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject

Posted by "Fuhwei Lwo (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475335 ] 

Fuhwei Lwo commented on TUSCANY-1132:
-------------------------------------

** Load this XML document in -

<?xml version="1.0" encoding="ASCII"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:simple="http://www.example.com/simple">
    <soapenv:Header/>
    <soapenv:Body>
        <simple:stockQuote>
          <symbol>fbnt</symbol>
          <companyName>FlyByNightTechnology</companyName>
          <price>1000.0</price>
          <open1>1000.0</open1>
          <high>1000.0</high>
          <low>1000.0</low>
          <volume>1000.0</volume>
          <change1>1000.0</change1>
          <quotes>
            <price>2000.0</price>
          </quotes>
        </simple:stockQuote>
    </soapenv:Body>
</soapenv:Envelope>

** Without registering the envelope metadata and invoking xmlHelper.save(doc.getRootObject(), "commonj.sdo", "dataObject", System.out);
** Loading the following is not working.

<?xml version="1.0" encoding="ASCII"?>
<sdo:dataObject xmlns:envelope="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sdo="commonj.sdo"
    xmlns:simple="http://www.example.com/simple">
    <envelope:Header/>
    <envelope:Body>
        <simple:stockQuote>
      <symbol>fbnt</symbol>
      <companyName>FlyByNightTechnology</companyName>
      <price>1000.0</price>
      <open1>1000.0</open1>
      <high>1000.0</high>
      <low>1000.0</low>
      <volume>1000.0</volume>
      <change1>1000.0</change1>
      <quotes>
        <price>2000.0</price>
      </quotes>
    </simple:stockQuote>
    </envelope:Body>
</sdo:dataObject>

** With registering the envelope metadata and invoking xmlHelper.save(doc.getRootObject(), "commonj.sdo", "dataObject", System.out);
** Loading the following is fine.

<?xml version="1.0" encoding="ASCII"?>
<sdo:dataObject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sdo="commonj.sdo"
    xmlns:simple="http://www.example.com/simple" xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/" xsi:type="tns:Envelope">
  <tns:Header/>
  <tns:Body>
    <simple:stockQuote>
      <symbol>fbnt</symbol>
      <companyName>FlyByNightTechnology</companyName>
      <price>1000.0</price>
      <open1>1000.0</open1>
      <high>1000.0</high>
      <low>1000.0</low>
      <volume>1000.0</volume>
      <change1>1000.0</change1>
      <quotes>
        <price>2000.0</price>
      </quotes>
    </simple:stockQuote>
  </tns:Body>
</sdo:dataObject>

> SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1132
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1132
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M3
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-M3
>
>         Attachments: tuscany-1132-testcase.patch
>
>
> With or without the patch of TUSCANY-1131 to fix the problem in XMLDocumentImpl.java, this problem always exists. With the fix from TUSCANY-1131, now I got this exception. I believe there are still some problem in the SDO Java serialization/deserialization code.
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:80)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:275)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:463)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:246)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:224)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:78)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:72)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:210)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:219)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.test.JavaSerializeDeserializeTestCase.testAnyTypeContainer(JavaSerializeDeserializeTestCase.java:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2418)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2403)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:1920)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1788)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1566)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1234)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1162)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1244)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:880)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:863)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:289)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:265)
> 	... 40 more
> Caused by: java.lang.ClassCastException: The feature 'dataObject's type 'DataObject' does not permit a value of type 'DataObject'
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1401)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1091)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2413)
> 	... 62 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1132) SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject

Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475088 ] 

Kelvin Goodson commented on TUSCANY-1132:
-----------------------------------------

Fuhwei,
  I don't think we want to be copying in order to serialize.  I would say, after a brief look at this, that the "disconnect - write - reconnect" approach you reference is appropriate.
Kelvin.

> SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1132
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1132
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M3
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-M3
>
>         Attachments: tuscany-1132-testcase.patch
>
>
> With or without the patch of TUSCANY-1131 to fix the problem in XMLDocumentImpl.java, this problem always exists. With the fix from TUSCANY-1131, now I got this exception. I believe there are still some problem in the SDO Java serialization/deserialization code.
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:80)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:275)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:463)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:246)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:224)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:78)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:72)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:210)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:219)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.test.JavaSerializeDeserializeTestCase.testAnyTypeContainer(JavaSerializeDeserializeTestCase.java:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2418)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2403)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:1920)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1788)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1566)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1234)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1162)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1244)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:880)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:863)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:289)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:265)
> 	... 40 more
> Caused by: java.lang.ClassCastException: The feature 'dataObject's type 'DataObject' does not permit a value of type 'DataObject'
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1401)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1091)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2413)
> 	... 62 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-1132) SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject

Posted by "Fuhwei Lwo (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fuhwei Lwo updated TUSCANY-1132:
--------------------------------

    Attachment: tuscany-1132-testcase.patch

I modified the existing JavaSerializeDeserializeTestCase.java (patch attached) with the quoteInSOAP.xml attached in TUSCANY-1131 for reproducing this problem. 

> SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1132
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1132
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M3
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-M3
>
>         Attachments: tuscany-1132-testcase.patch
>
>
> With or without the patch of TUSCANY-1131 to fix the problem in XMLDocumentImpl.java, this problem always exists. With the fix from TUSCANY-1131, now I got this exception. I believe there are still some problem in the SDO Java serialization/deserialization code.
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:80)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:275)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:463)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:246)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:224)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:78)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:72)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:210)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:219)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.test.JavaSerializeDeserializeTestCase.testAnyTypeContainer(JavaSerializeDeserializeTestCase.java:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2418)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2403)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:1920)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1788)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1566)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1234)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1162)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1244)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:880)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:863)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:289)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:265)
> 	... 40 more
> Caused by: java.lang.ClassCastException: The feature 'dataObject's type 'DataObject' does not permit a value of type 'DataObject'
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1401)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1091)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2413)
> 	... 62 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1132) SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject

Posted by "Fuhwei Lwo (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475174 ] 

Fuhwei Lwo commented on TUSCANY-1132:
-------------------------------------

Frank, I narrowed it down this has nothing to do with xpath and whether the serialization target is root or not. It's simply we cannot load what we have serialized. Below is what we have serialized.  Any idea why?  The only namespace I didn't register with SDO with XSD is "http://schemas.xmlsoap.org/soap/envelope/"

<?xml version="1.0" encoding="ASCII"?>
<sdo:dataObject xmlns:envelope="http://schemas.xmlsoap.org/soap/envelope/" xmlns:payload.soabench.ibm.com="http://payload.soabench.ibm.com"
    xmlns:sdo="commonj.sdo" xmlns:soaassureservice.soabench.ibm.com="http://soaassureservice.soabench.ibm.com">
   <envelope:Header/>
   <envelope:Body>
      <soaassureservice.soabench.ibm.com:createClaim>
      <soaassureservice.soabench.ibm.com:claimRequest>
        <soaassureservice.soabench.ibm.com:requestInfo>
          <payload.soabench.ibm.com:infrastructureMode>true</payload.soabench.ibm.com:infrastructureMode>
          <payload.soabench.ibm.com:faultPercentage>0</payload.soabench.ibm.com:faultPercentage>
          <payload.soabench.ibm.com:staffThinkTime>0</payload.soabench.ibm.com:staffThinkTime>
          <payload.soabench.ibm.com:simulateStaff>false</payload.soabench.ibm.com:simulateStaff>
          <payload.soabench.ibm.com:requestSize>10</payload.soabench.ibm.com:requestSize>
          <payload.soabench.ibm.com:request25KxN>0</payload.soabench.ibm.com:request25KxN>
          <payload.soabench.ibm.com:responseSize>10</payload.soabench.ibm.com:responseSize>
          <payload.soabench.ibm.com:response25KxN>0</payload.soabench.ibm.com:response25KxN>
        </soaassureservice.soabench.ibm.com:requestInfo>
      </soaassureservice.soabench.ibm.com:claimRequest>
    </soaassureservice.soabench.ibm.com:createClaim>
   </envelope:Body>
</sdo:dataObject>

> SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1132
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1132
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M3
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-M3
>
>         Attachments: tuscany-1132-testcase.patch
>
>
> With or without the patch of TUSCANY-1131 to fix the problem in XMLDocumentImpl.java, this problem always exists. With the fix from TUSCANY-1131, now I got this exception. I believe there are still some problem in the SDO Java serialization/deserialization code.
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:80)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:275)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:463)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:246)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:224)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:78)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:72)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:210)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:219)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.test.JavaSerializeDeserializeTestCase.testAnyTypeContainer(JavaSerializeDeserializeTestCase.java:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2418)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2403)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:1920)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1788)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1566)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1234)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1162)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1244)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:880)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:863)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:289)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:265)
> 	... 40 more
> Caused by: java.lang.ClassCastException: The feature 'dataObject's type 'DataObject' does not permit a value of type 'DataObject'
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1401)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1091)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2413)
> 	... 62 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1132) SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject

Posted by "Fuhwei Lwo (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475118 ] 

Fuhwei Lwo commented on TUSCANY-1132:
-------------------------------------

Frank,

I think Kelvin meant detach the target dataobject from the tree, serialize it, then put it back to the tree.

The problem occurs when a non-root dataobject in the middle of the tree was serialized to a Java object, the Java object will contain info that was not serialized which means the parents of the target dataobject won't be in the Java object.  When one reads the Java object back, the deserializer don't know how to deal with those erroneous info. That's why we either need to make a copy of the target dataobject or detach the target dataobject from its tree temporarily.

What do you think?

> SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1132
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1132
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M3
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-M3
>
>         Attachments: tuscany-1132-testcase.patch
>
>
> With or without the patch of TUSCANY-1131 to fix the problem in XMLDocumentImpl.java, this problem always exists. With the fix from TUSCANY-1131, now I got this exception. I believe there are still some problem in the SDO Java serialization/deserialization code.
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:80)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:275)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:463)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:246)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:224)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:78)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:72)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:210)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:219)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.test.JavaSerializeDeserializeTestCase.testAnyTypeContainer(JavaSerializeDeserializeTestCase.java:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2418)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2403)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:1920)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1788)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1566)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1234)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1162)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1244)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:880)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:863)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:289)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:265)
> 	... 40 more
> Caused by: java.lang.ClassCastException: The feature 'dataObject's type 'DataObject' does not permit a value of type 'DataObject'
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1401)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1091)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2413)
> 	... 62 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1132) SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject

Posted by "Fuhwei Lwo (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475146 ] 

Fuhwei Lwo commented on TUSCANY-1132:
-------------------------------------

Let me try with some code.

ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = SDOUtil.createObjectOutputStream(bos, hc);
oos.writeObject(nonRootDataObject);  // <=== code to pay attention
oos.close();
bos.close();

When the client code above was executed, the writeDataObject(DataObject, ObjectOutput) method in the HelperProviderImpl will be called for every dataobject in the tree. In the writeDataObject(), there is a condition like below to serialize the dataobject with xpath starting from the root dataobject. Since the client code above is trying to serialize the nonRootDataObject not the root object, the xpath will be wrong when readObject() was called later.

else if (dataObject.getContainer() != null)
      {
        objectOutput.writeByte(0);
        objectOutput.writeUTF(DataObjectUtil.getXPath(dataObject));
        objectOutput.writeObject(dataObject.getRootObject());
      }

Let me know if you have further question.

> SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1132
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1132
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M3
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-M3
>
>         Attachments: tuscany-1132-testcase.patch
>
>
> With or without the patch of TUSCANY-1131 to fix the problem in XMLDocumentImpl.java, this problem always exists. With the fix from TUSCANY-1131, now I got this exception. I believe there are still some problem in the SDO Java serialization/deserialization code.
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:80)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:275)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:463)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:246)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:224)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:78)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:72)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:210)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:219)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.test.JavaSerializeDeserializeTestCase.testAnyTypeContainer(JavaSerializeDeserializeTestCase.java:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2418)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2403)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:1920)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1788)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1566)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1234)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1162)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1244)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:880)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:863)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:289)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:265)
> 	... 40 more
> Caused by: java.lang.ClassCastException: The feature 'dataObject's type 'DataObject' does not permit a value of type 'DataObject'
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1401)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1091)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2413)
> 	... 62 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1132) SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject

Posted by "Fuhwei Lwo (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475163 ] 

Fuhwei Lwo commented on TUSCANY-1132:
-------------------------------------

Frank, I think I may have misunderstood the serialization format mentioned in the 2.1 spec. It seems we do need to serialize the whole tree along with the path to the target data object. So we did serialize correctly but have a problem to deserialize it.

> SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1132
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1132
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M3
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-M3
>
>         Attachments: tuscany-1132-testcase.patch
>
>
> With or without the patch of TUSCANY-1131 to fix the problem in XMLDocumentImpl.java, this problem always exists. With the fix from TUSCANY-1131, now I got this exception. I believe there are still some problem in the SDO Java serialization/deserialization code.
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:80)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:275)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:463)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:246)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:224)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:78)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:72)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:210)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:219)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.test.JavaSerializeDeserializeTestCase.testAnyTypeContainer(JavaSerializeDeserializeTestCase.java:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2418)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2403)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:1920)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1788)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1566)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1234)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1162)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1244)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:880)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:863)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:289)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:265)
> 	... 40 more
> Caused by: java.lang.ClassCastException: The feature 'dataObject's type 'DataObject' does not permit a value of type 'DataObject'
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1401)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1091)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2413)
> 	... 62 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1132) SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject

Posted by "Frank Budinsky (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475136 ] 

Frank Budinsky commented on TUSCANY-1132:
-----------------------------------------

Thanks Fuhwei, but I still don't think I understand. What do you mean by "serialized to a Java object"? Do you mean "to a ObjectOutputStream"? What info is this referring to: "the Java object will contain info that was not serialized"? Can you provide an example and show exactly what's wrong? I would prefer a solution where we avoid producing the info that is causing the problem without temporarily detaching the object. Maybe that's not possible, but I don't understand the problem well enough to know.

Thanks,
Frank.

> SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1132
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1132
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M3
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-M3
>
>         Attachments: tuscany-1132-testcase.patch
>
>
> With or without the patch of TUSCANY-1131 to fix the problem in XMLDocumentImpl.java, this problem always exists. With the fix from TUSCANY-1131, now I got this exception. I believe there are still some problem in the SDO Java serialization/deserialization code.
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:80)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:275)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:463)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:246)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:224)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:78)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:72)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:210)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:219)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.test.JavaSerializeDeserializeTestCase.testAnyTypeContainer(JavaSerializeDeserializeTestCase.java:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2418)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2403)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:1920)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1788)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1566)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1234)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1162)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1244)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:880)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:863)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:289)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:265)
> 	... 40 more
> Caused by: java.lang.ClassCastException: The feature 'dataObject's type 'DataObject' does not permit a value of type 'DataObject'
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1401)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1091)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2413)
> 	... 62 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1132) SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject

Posted by "Yang ZHONG (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476443 ] 

Yang ZHONG commented on TUSCANY-1132:
-------------------------------------

2 comments.

2-1. It seems problem found and solved. What's left?

  Missing xsi:type seems the problem.
  If I understand Fuhwei's most recent comment correctly, registering SOAP metadata will generate xsi:type therefore solve the problem.
  What's left?

2-2. Further thinking of serializing containers, some are unintentional

  In some SCA implementation, transported DataObject is contained by SOAP Envelope.
  As a data transportation service, it's fine for SCA to convey DataObject in any Envelope.
  However, SCA sould have removed the transportation container before handing over DataObject to users.
  Otherwise, users will see extra container/exception unexpected for their business processing.
  Such container serializing is unintentional, actually the container should have been there in the first place.

  On the other hand, users do sometimes contain target DataObject.
  Serializing containers is intentional in such scenario, therefore current SDO serialization behaves as designed by including containers.

> SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1132
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1132
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M3
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-M3
>
>         Attachments: tuscany-1132-testcase.patch
>
>
> With or without the patch of TUSCANY-1131 to fix the problem in XMLDocumentImpl.java, this problem always exists. With the fix from TUSCANY-1131, now I got this exception. I believe there are still some problem in the SDO Java serialization/deserialization code.
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:80)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:275)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:463)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:246)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:224)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:78)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:72)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:210)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:219)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.test.JavaSerializeDeserializeTestCase.testAnyTypeContainer(JavaSerializeDeserializeTestCase.java:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2418)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2403)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:1920)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1788)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1566)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1234)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1162)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1244)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:880)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:863)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:289)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:265)
> 	... 40 more
> Caused by: java.lang.ClassCastException: The feature 'dataObject's type 'DataObject' does not permit a value of type 'DataObject'
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1401)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1091)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2413)
> 	... 62 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1132) SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject

Posted by "Frank Budinsky (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475113 ] 

Frank Budinsky commented on TUSCANY-1132:
-----------------------------------------

Can someone explain why even a "disconnect" is needed? What exactly is the problem? My preference would be to try to fix this without disconnect or copy, if possible.

> SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1132
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1132
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M3
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-M3
>
>         Attachments: tuscany-1132-testcase.patch
>
>
> With or without the patch of TUSCANY-1131 to fix the problem in XMLDocumentImpl.java, this problem always exists. With the fix from TUSCANY-1131, now I got this exception. I believe there are still some problem in the SDO Java serialization/deserialization code.
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:80)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:275)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:463)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:246)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:224)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:78)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:72)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:210)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:219)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.test.JavaSerializeDeserializeTestCase.testAnyTypeContainer(JavaSerializeDeserializeTestCase.java:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2418)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2403)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:1920)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1788)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1566)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1234)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1162)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1244)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:880)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:863)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:289)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:265)
> 	... 40 more
> Caused by: java.lang.ClassCastException: The feature 'dataObject's type 'DataObject' does not permit a value of type 'DataObject'
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1401)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1091)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2413)
> 	... 62 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1132) SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject

Posted by "Fuhwei Lwo (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475050 ] 

Fuhwei Lwo commented on TUSCANY-1132:
-------------------------------------

I found out the problem was caused by the HelperProviderImpl.writeDataObject() method that cannot handle the serialized data object that has a container.  I made a quick fix in the writeExternal() method and my test case works. Now, the question is whether this fix is good enough by making a new copy of dataobject tree or we should take the similar approach like XMLDocumentImpl.save() to preserve the original dataobjec tree by temporarily detach the target, serialize it, then put it back.

public void writeExternal(ObjectOutput out) throws IOException
    {
      if (target instanceof DataObject)
      {
          if(out instanceof SDOObjectOutputStream)
          {
              CopyHelper copyHelperLocal = ((SDOObjectOutputStream)out).getHelperContext().getCopyHelper();
              target = copyHelperLocal.copy((DataObject)target);
          }
        writeDataObject((DataObject)target, out);
      }
      else
      {
        throw new NotSerializableException(); // should never happen
      }
    }

> SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1132
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1132
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M3
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-M3
>
>         Attachments: tuscany-1132-testcase.patch
>
>
> With or without the patch of TUSCANY-1131 to fix the problem in XMLDocumentImpl.java, this problem always exists. With the fix from TUSCANY-1131, now I got this exception. I believe there are still some problem in the SDO Java serialization/deserialization code.
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:80)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:275)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:463)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:246)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:224)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:78)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:72)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:210)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:219)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.test.JavaSerializeDeserializeTestCase.testAnyTypeContainer(JavaSerializeDeserializeTestCase.java:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2418)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2403)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:1920)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1788)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1566)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1234)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1162)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1244)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:880)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:863)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:289)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:265)
> 	... 40 more
> Caused by: java.lang.ClassCastException: The feature 'dataObject's type 'DataObject' does not permit a value of type 'DataObject'
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1401)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1091)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2413)
> 	... 62 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-1132) SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject

Posted by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Sebastien Delfino updated TUSCANY-1132:
--------------------------------------------

    Patch Info: [Patch Available]

> SDO Java serialization/deserialization throws an exception when the serialized data object is not the root and its container is of AnyTypeDataObject
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1132
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1132
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M3
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-M3
>
>         Attachments: tuscany-1132-testcase.patch
>
>
> With or without the patch of TUSCANY-1131 to fix the problem in XMLDocumentImpl.java, this problem always exists. With the fix from TUSCANY-1131, now I got this exception. I believe there are still some problem in the SDO Java serialization/deserialization code.
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:80)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:275)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:463)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:246)
> 	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:224)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:78)
> 	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:72)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:210)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readDataObject(HelperProviderImpl.java:219)
> 	at org.apache.tuscany.sdo.helper.HelperProviderImpl$ResolvableImpl.readExternal(HelperProviderImpl.java:150)
> 	at commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1774)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
> 	at org.apache.tuscany.sdo.test.JavaSerializeDeserializeTestCase.testAnyTypeContainer(JavaSerializeDeserializeTestCase.java:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@65786578 (eClass: org.apache.tuscany.sdo.impl.ClassImpl@c380c38 (name: DataObject) (instanceClassName: null) (abstract: true, interface: false))' is not legal. (http:///temp.xml, 3, 50)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2418)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2403)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:1920)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1788)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1566)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1234)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1162)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1244)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:880)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:863)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
> 	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:289)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:265)
> 	... 40 more
> Caused by: java.lang.ClassCastException: The feature 'dataObject's type 'DataObject' does not permit a value of type 'DataObject'
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
> 	at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
> 	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1401)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
> 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1091)
> 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2413)
> 	... 62 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org