[elephant-devel] unable to use persistent-class

Robert L. Read read at robertlread.net
Wed Jan 25 19:31:35 UTC 2006


You will also have to depend on :ele-bdb.

Yes, it looks to me like it is the same problem as Waldo's that you
mention;
you have to call:

(open-store "pathtotheBerkeleyDBdatabasedirectory")

before you invoke defclass.

I would try executing that, and then your class definition,
directly in a  REPL or listener by hand.

If that works, you might have to do the open-store inside an "eval-when"
clause,
depending on how you have organized your code.

Does that make sense?



On Wed, 2006-01-25 at 20:45 +0200, Aycan iRiCAN wrote:

> Hello,
> 
> I'm trying to use elephant in one of our projects. It's a simple UCW
> based web application. I set up elephant properly and run
> tests. Started sbcl with slime and evaluate a few lines
> 
> (asdf:oos 'asdf:load-op :elephant)
> (asdf:oos 'asdf:load-op :ele-bdb)
> (asdf:oos 'asdf:load-op :elephant-tests)
> (do-all-tests-spec *testdb-path*)
> 
> The result is:
> 
> 5 out of 106 total tests failed: BASICPERSISTENCE, MIGRATE1, MIGRATE2,
>    MIGRATE3, MIGRATE4.
> 
> After these results, I think that I can try to use it with my
> application. I just added :elephant to dependencies of my system
> definition. 
> 
> <snip>
>    :depends-on (:ucw :elephant)
> </snip>
> 
> And also added it to my package definition.
> 
> <snip>
>     (:use :common-lisp :it.bese.ucw :elephant)
> </snip>
> 
> I have a simple content class. So I defined its metaclass.
> 
> (defclass content ()
>     ((title :accessor title
>             :initarg :title
>             :initform "Sample Title"
>             :documentation "Title for content")
>      (data :accessor data
>            :initarg :data
>            :initform "Data"
>            :documentation "Data for content"))
>   (:metaclass persistent-metaclass))
> 
> After these steps, I tried to load my app with asdf but got this
> error:
> 
> debugger invoked on a SIMPLE-ERROR in thread
> #<THREAD "initial thread" {90033C9}>:
>   Error during processing of --eval option (LOAD #P"bin/make-image.lisp"):
> 
>   There is no applicable method for the generic function
>     #<STANDARD-GENERIC-FUNCTION ELEPHANT::NEXT-OID (1)>
>   when called with arguments
>     (NIL).
> 
> Is this problem related with Waldo Rubinstein's post? 
>     http://common-lisp.net/pipermail/elephant-devel/2006-January/000212.html
> 
> Can you give me a temporary solution?
> 
> Best Regards.
> 
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/elephant-devel/attachments/20060125/afd47980/attachment.html>


More information about the elephant-devel mailing list