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

Fwd: Re: Delete an Object





----------  Forwarded Message  ----------
Subject: Re: Delete an Object
Date: Mon, 27 Mar 2000 14:59:19 +0200
From: Falko Braeutigam <falko@softwarebuero.de>


On Mon, 27 Mar 2000, Wolfgang Klaus wrote:
> I'm playing with your sample Application from the tutorial.
> 
> I extended the Car sample for some tests.
If you want to change a class, you have to add a stream version to the class.
Something like:

	long serialVersionUID = 1;

If you do not set this variable, the compiler creates one every time it is
invoked. The compiler assumes that each change to the class file make them
incompatible to any other version. By setting serialVersionUID you can define
which classes (*.class files) are compatible to which serialized data. Read the
Java Serializetion doc for more details.


> 
> I had an error in the Applicaton. When I now want to create an object
> with the name
> my_first_car. I get the following Error-Message:
> org.ozoneDB.OzoneInternalExc: java.io.InvalidClassException:
> com.tps.doc.tutorial.CarImpl; Local class not compatible: stream
> classdesc serialVersionUID=-7299675044373516721 local class
> serialVersionUID=-9149997181729518385
> When I want to delete the Object.. Ozone did not find any Object.
> 
> 
> When I change the name to my_first_car2. It work's fine.
> 
> My Question now is, how can I remove the Object with the ID
> 'my_first_car' from the database?
> There must be a anywhere a reference.
> Should I remove the Data-directory and create a new one?

ozone does not maintain the class files inside the server or something. It
relies on the programmer to provide proper *.class files. Without them, the
database is useless. In other words: you have to re-create the database.


Falko
-- 
______________________________________________________________________
Falko Braeutigam                         mailto:falko@softwarebuero.de
softwarebuero m&b (SMB)                    http://www.softwarebuero.de
--
________________________________________________________________
Lars Martin                         mailto:lars@softwarebuero.de
softwarebuero m&b (SMB)              http://www.softwarebuero.de