[elephant-devel] unable to use persistent-class

Aycan iRiCAN aycan.irican at core.gen.tr
Wed Jan 25 20:58:52 UTC 2006


Thank you,

I opened the store before my class declaration. Could this be changed
in the future? Why we need to open the store first?

Now I have another problem. I have a web action that handles a form
post. This action creates an instace of content class and fills the
data slot.

Since I am using utf-8 encoding with sbcl, when I list the content
instances with a web page, I'm having strange characters from data
slot.

Is there any problem with utf-8? I didn't tried to persist the
instance yet. Just created an instance and read back from it.

Best Regards.

"Robert L. Read" <read at robertlread.net> writes:

> 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

-- 
Aycan iRiCAN
C0R3 Computer Security Group
http://www.core.gen.tr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/elephant-devel/attachments/20060125/1a654824/attachment.sig>


More information about the elephant-devel mailing list