[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Object is not Serializable - Exception



hai,

as per ur suggestion i have implemented Serilizable interface in both of my
classes (EData and ToDo). but i still get Serializable exception. but
previously it was "unexpected exception" and now it is "Transaction
Exception".

The exception that i get is:

org.ozoneDB.TransactionExc: java.io.NotSerializableException: ToDo [code: 2]
        at
org.ozoneDB.ExternalDatabase.sendCommand(ExternalDatabase.java:402)
        at
org.ozoneDB.ExternalDatabase.sendCommand(ExternalDatabase.java:376)
        at
org.ozoneDB.ExternalDatabase.createObject(ExternalDatabase.java:615)
        at
org.ozoneDB.ExternalDatabase.createObject(ExternalDatabase.java:609)
        at MyApp.main(MyApp.java:14)


i have the proxy class only for EData and not for ToDo. ToDo's object is an
attribute in EData.
thanx for ur immediate response.
bye
priyaa




----- Original Message -----
From: Falko Braeutigam <falko@smb-tec.com>
To: Priyaa <Priyaa@vdc.equadriga.com>; <ozone-users@ozone-db.org>
Sent: Wednesday, March 07, 2001 12:34 AM
Subject: Re: Object is not Serializable - Exception


> On Tue, 06 Mar 2001, Priyaa wrote:
> > >%_Hai,
> >
> > Actually i have class CarImpl which has a attribute wheelList of type
Vector, the elements that i store in this wheelList is an object of type
Wheel.
> >
> > Now, i want to store the CarImpl object in the Ozone database,
> > do i need to create an Impl class  and a proxy class for Wheel Object.
> > or the CarImpl by itself stores the Wheel object also.
>
> Depends on the design of your application. If there are not too much and
> small Wheel objects that no other object than the enclosing CarImpl
objects
> needs to directly access, then Wheel objects should not be a database
object.
> Thus no proxies and Impls are needed.
>
> >
> > the above mentioned is my basic doubt.  but i have tested this concept
in both the ways.
> > in both the ways it gives me an unexpected exception: wheelImpl is not
serilizable.(this error occurs even when i am creating proxy class for wheel
object )
>
> This probably has nothing to do with the above. It simply means that your
> Whell(Impl) class is not serializable.
>
>
> Falko
> --
> ______________________________________________________________________
> Falko Braeutigam                              mailto:falko@smb-tec.com
> SMB GmbH                                        http://www.smb-tec.com
>