You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Paul Tomsic <pt...@yahoo.com> on 2006/04/04 23:06:07 UTC

error serializing an SDO2 graph or object

i can't seem to serialize a dataobject w/o first
having a datagraph on the dataobject.

i did find the following:

http://issues.apache.org/jira/browse/TUSCANY-22

I'm getting the same stack trace that's listed in that
jira posting.  
Is there a way around this?

Here's my code:

---------------
        DataGraph dataGraph =
SDOUtil.createDataGraph();
        DataObject errorList =
dataGraph.createRootObject(TEST_NAMESPACE, "foo");
        errorList.setString("bar", "alpha");
        errorList.setString("baz", "bravo");
        File tmpFile = new
File(System.getProperty("java.io.tmpdir") +
"/foo.xml");
        FileOutputStream fos = new
FileOutputStream(tmpFile);
        ObjectOutputStream out = new
ObjectOutputStream(fos);
        out.writeObject(errorList);
        out.close();

---------------

thx


Re: error serializing an SDO2 graph or object

Posted by Paul Tomsic <pt...@yahoo.com>.
So, the whole implementation assumes that you're
staying within the same JVM?
How would you recommend shipping DataObjects/Graphs
across the wire?


--- Fuhwei Lwo <fu...@bricemedia.com> wrote:

> Java serialization and deserialization of data
> graphs and data objects  are not supported yet. I
> don't recommend you utilize this feature now.
>   
>   Fuhwei
> 
> Paul Tomsic <pt...@yahoo.com> wrote:  i can't seem
> to serialize a dataobject w/o first
> having a datagraph on the dataobject.
> 
> i did find the following:
> 
> http://issues.apache.org/jira/browse/TUSCANY-22
> 
> I'm getting the same stack trace that's listed in
> that
> jira posting.  
> Is there a way around this?
> 
> Here's my code:
> 
> ---------------
>         DataGraph dataGraph =
> SDOUtil.createDataGraph();
>         DataObject errorList =
> dataGraph.createRootObject(TEST_NAMESPACE, "foo");
>         errorList.setString("bar", "alpha");
>         errorList.setString("baz", "bravo");
>         File tmpFile = new
> File(System.getProperty("java.io.tmpdir") +
> "/foo.xml");
>         FileOutputStream fos = new
> FileOutputStream(tmpFile);
>         ObjectOutputStream out = new
> ObjectOutputStream(fos);
>         out.writeObject(errorList);
>         out.close();
> 
> ---------------
> 
> thx
> 
> 
> 


Re: error serializing an SDO2 graph or object

Posted by Fuhwei Lwo <fu...@bricemedia.com>.
Java serialization and deserialization of data graphs and data objects  are not supported yet. I don't recommend you utilize this feature now.
  
  Fuhwei

Paul Tomsic <pt...@yahoo.com> wrote:  i can't seem to serialize a dataobject w/o first
having a datagraph on the dataobject.

i did find the following:

http://issues.apache.org/jira/browse/TUSCANY-22

I'm getting the same stack trace that's listed in that
jira posting.  
Is there a way around this?

Here's my code:

---------------
        DataGraph dataGraph =
SDOUtil.createDataGraph();
        DataObject errorList =
dataGraph.createRootObject(TEST_NAMESPACE, "foo");
        errorList.setString("bar", "alpha");
        errorList.setString("baz", "bravo");
        File tmpFile = new
File(System.getProperty("java.io.tmpdir") +
"/foo.xml");
        FileOutputStream fos = new
FileOutputStream(tmpFile);
        ObjectOutputStream out = new
ObjectOutputStream(fos);
        out.writeObject(errorList);
        out.close();

---------------

thx



Re: error serializing an SDO2 graph or object

Posted by Frank Budinsky <fr...@ca.ibm.com>.
Hi Paul,

You're right that the problem is the one described in TUSCANY-22 ... it's 
just not implemented yet. For now, you can use XMLHelper.save(DataObject, 
...) to serialize your object.

Frank.


Paul Tomsic <pt...@yahoo.com> wrote on 04/04/2006 05:06:07 PM:

> i can't seem to serialize a dataobject w/o first
> having a datagraph on the dataobject.
> 
> i did find the following:
> 
> http://issues.apache.org/jira/browse/TUSCANY-22
> 
> I'm getting the same stack trace that's listed in that
> jira posting. 
> Is there a way around this?
> 
> Here's my code:
> 
> ---------------
>         DataGraph dataGraph =
> SDOUtil.createDataGraph();
>         DataObject errorList =
> dataGraph.createRootObject(TEST_NAMESPACE, "foo");
>         errorList.setString("bar", "alpha");
>         errorList.setString("baz", "bravo");
>         File tmpFile = new
> File(System.getProperty("java.io.tmpdir") +
> "/foo.xml");
>         FileOutputStream fos = new
> FileOutputStream(tmpFile);
>         ObjectOutputStream out = new
> ObjectOutputStream(fos);
>         out.writeObject(errorList);
>         out.close();
> 
> ---------------
> 
> thx
>