[elephant-devel] sb-mop:finalize-inheritance

Lukas Gießmann lukas.giessmann at hotmail.de
Sun Feb 7 11:30:08 UTC 2010


Hello,

I am using elephant with sbcl. I found a strange behavior in a more or less complex scenario but I am not sure if it is a bug or a fault caused by myself?
So I am posting here in hope that someone has a similar experience:

After starting our system via (asdf:operate 'asdf:load-op ...) and creating some objects of the defined classes I closed the sbcl interpreter/slime.
When I restarted the system and tried to read some data I got the following error:
SB-MOP:CLASS-SLOTS called on #<ELEPHANT:PERSISTENT-METACLASS DATAMODEL:ITEMIDENTIFIERC>, which is not yet finalized.
   [Condition of type SB-INT:SIMPLE-REFERENCE-ERROR]

After this message I called the function (sb-mop:finalize-inheritance (find-class 'd:ItemIdentifierC)) with the effect that it was possible to read the data (an object of the type 'd:ItemIdentifierC).
The actual error is caused in src/elephant/metaclasse.lisp by the function find-slot-def-by-name.

When I called the function (sb-mop:class-finalized-p (find-class 'd:ItemIdentifierC)) after loading our system and before creating any data - in this case objects of the type 'd:ItemIdentifierC - the result was always nil. When I created an object of this type the result was t.

Is it necessary to call sb-mop:finalize-inheritance explecitely?


Maybe the class-hierarchy can help a little bit:

(elephant:defpclass TopicMapConstructC ()
  ((versions :associate (VersionInfoC versioned-construct)
             :accessor versions
             :initarg :versions)))

(elephant:defpclass PointerC (TopicMapConstructC)
  ((uri :accessor uri
        :initarg :uri
        :type string
        :initform (error "The uri must be set for a pointer")
        :index t)
   (identified-construct :accessor identified-construct
                         :initarg :identified-construct
                         :associate ReifiableConstructC)))

(elephant:defpclass IdentifierC (PointerC)
  ())

(elephant:defpclass ItemIdentifierC (IdentifierC) 
  ()
  (:index t))



Best regards

Lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/elephant-devel/attachments/20100207/59732b95/attachment.html>


More information about the elephant-devel mailing list