[ 
http://issues.apache.org/jira/browse/TUSCANY-22?page=comments#action_12365491 ] 

Frank Budinsky commented on TUSCANY-22:
---------------------------------------

Brent,

The problem is caused by the fact that the old SDO1 implementation of 
writeReplace() relied on EMF notification, which is no longer enabled in the 
SDO2 impl. The plan is to completely replace the implementation of 
writeReplace(), but depending on how urgently you need Java serialization to 
work, I'd consider hacking a few things to make the old impl work temporarily.

Please let me know how important this function is for you and how soon you need 
it to work.

Thanks,
Frank

> Errors serializing an SDO2 graph
> --------------------------------
>
>          Key: TUSCANY-22
>          URL: http://issues.apache.org/jira/browse/TUSCANY-22
>      Project: Tuscany
>         Type: Bug
>   Components: Java SDO Implementation
>  Environment: 2/2 EMF integration build
>     Reporter: Brent Daniel

>
> I am having a problem with serialization of an SDO2 datagraph 
> Using java serialization (ObjectOutputStream.writeObject()), I receive the 
> following exception:
> java.lang.UnsupportedOperationException
>       at 
> org.eclipse.emf.common.util.ECollections$EmptyUnmodifiableEList.add(ECollections.java:638)
>       at 
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.setTrackingModification(ResourceImpl.java:1212)
>       at 
> org.apache.tuscany.sdo.impl.DataGraphImpl.getWriteReplacement(DataGraphImpl.java:740)
>       at 
> org.apache.tuscany.sdo.impl.DataGraphImpl.getWriteReplacement(DataGraphImpl.java:766)
>       at 
> org.apache.tuscany.sdo.impl.DataObjectImpl.writeReplace(DataObjectImpl.java:113)
>       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 
> java.io.ObjectStreamClass.invokeWriteReplace(ObjectStreamClass.java:1059)
>       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1063)
>       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:324)
>       at 
> org.apache.tuscany.das.rdb.test.SerializationTests.testReadandSerialize(SerializationTests.java:69)
> Note, the same test case works with SDO 1 and is currently available in SVN 
> (org.apache.tuscany.das.rdb.test.SerializationTests)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to