[Bese-devel] Be aware

Friedrich Dominicus frido at q-software-solutions.de
Sat Mar 11 09:29:41 UTC 2006


of eval when in defactions. I have spend 2 hours on the following code
(defun db-con ()
  (qss.db:db-connect)
  (clsql:enable-sql-reader-syntax))


;; actions
(defaction download-locations ((form get-downloader))
  (db-con)


I first had the content of db-con in the action download-locations
and get an error message I could not understand in any way something
along thelines
Sorry, EVAL-WHEN not yet implemented or the like

Now after writing another test case where it worked like intended I
got crazy. How could that be that the other test runs and this
failed. After starring at the code for quite a while I remember having
read half a year or so ago that you can not use eval-when in actions. 

I tried it and really this time this work.


But the next trouble is not far away:
this is what the slime inspector says about my application:
An object.
 [type: COOKIE-SESSION-APPLICATION]
--------------------
Class: #<STANDARD-CLASS COOKIE-SESSION-APPLICATION>
Slots:
URL-PREFIX = "/ucw/downloader/"
SESSION-TYPE = IT.BESE.UCW::STANDARD-SESSION
TAL-GENERATOR = #<unbound>
WWW-ROOTS = NIL
CHARSET = :UTF-8
ENTRY-POINTS = (#<STANDARD-ENTRY-POINT {10054569E1}>)
SESSION-TABLE = #<HASH-TABLE :TEST EQUAL :COUNT 0 {1004F1D771}>
SERVER = #<STANDARD-SERVER ASERVE-BACKEND 1 {100242BEE1}>
DEBUG-ON-ERROR = T
ENTRY-POINT-CACHE = #<HASH-TABLE :TEST EQUAL :COUNT 0 {1004F1DBA1}>


Now obviously there is an entry point defined, let's check it:
Class: #<STANDARD-CLASS STANDARD-ENTRY-POINT>
Slots:
ACTION = #<CLOSURE (LAMBDA NIL) {100546C789}>
URL = "j3.ucw"
APPLICATION = #0=#<COOKIE-SESSION-APPLICATION "/ucw/downloader/" {1004F1D201}>

Oh find there should be a j3.ucw at /ucw/downloader

Now let's try it:
this URL
http://localhost:8080/ucw/downloader/j3.ucw

results in:
Condition IT.BESE.UCW::INEXISTENT-ENTRY-POINT was signalled.
   [Condition of type IT.BESE.UCW::INEXISTENT-ENTRY-POINT]

Restarts:
  0: [SERVER-ERROR] Send the client an internal server error page.
  1: [GENERATE-BACKTRACE-FOR-EMACS] Generate a bug report in Emacs.
  2: [FAIL-MISERABLY] Pretend this request never happend and fail.
  3: [TRY-AGAIN] Play this request over from the top.
  4: [ABANDON] Abandon this request and wait for the next one
  5: [TERMINATE-THREAD] Terminate this thread (#<THREAD "8-aserve-worker" {10049084A1}>)


fully understandable? 

Not for me

Friedrich



More information about the bese-devel mailing list