From: Lars Rune Nøstdal
Subject: Re: newbie question
Date: 
Message-ID: <1230900129.3566.15.camel@blackbox.nostdal.org>
On Thu, 2009-01-01 at 09:45 -0800, James wrote:
> I've banged my head against the wall on this for the past couple of
> days, and haven't been able to figure it out.  I know it's a newb
> question, but hey - I'm a newb.  I'm working with hunchentoot and cl-
> who, working on a modified, webified version of the PCL cd library -
> pushing message posts onto a list instead of cds.  My problem comes
> from a misunderstanding or a failure to understand macros in some way
> (I think).  When I try to run the following code, hunchentoot throws
> back a 500 error.
> 
> (defun display-message ()
>   (cl-who:with-html-output-to-string (*+html-stream+*)
>     (:html
>      (:head (:title "Show a single message"))
>      (:body
>       (:div
>        (let ((msgid (hunchentoot:get-parameter "message")))
> 	 (cl-who:fmt "Slot value of 'subject: ~A" (slot-value (car (select
> (where :message-id msgid))) 'subject))))))))
> 
> 
> If I replace the last msgid with a number, it works fine.  I know it's
> something I'm missing with macros, but I can't figure it out on my -
> any pointers?

You've probably solved this now, but for later you might try setting
TBNL:*CATCH-ERRORS-P* to NIL so you can debug the problem using the Lisp
debugger with a proper backtrace etc. instead of just getting a "HTTP
500 error" message in the browser.

http://www.weitz.de/hunchentoot/#debug

From: James
Subject: Re: newbie question
Date: 
Message-ID: <90cdfcf2-6d8b-4117-ae99-24b6085e7115@w34g2000yqm.googlegroups.com>
Lars - Thanks for that - I now see that I'm getting the following
error:

(ERROR ··@<There is no applicable method for the generic function
~2I~_~S~\n          ~I~_when called with arguments ~2I~_~S.~:>")
[:EXTERNAL]


Now I just have to figure out WHY I'm getting the error...

> You've probably solved this now, but for later you might try setting
> TBNL:*CATCH-ERRORS-P* to NIL so you can debug the problem using the Lisp
> debugger with a proper backtrace etc. instead of just getting a "HTTP
> 500 error" message in the browser.
>
> http://www.weitz.de/hunchentoot/#debug
From: Lars Rune Nøstdal
Subject: Re: newbie question
Date: 
Message-ID: <1230935943.3566.22.camel@blackbox.nostdal.org>
On Fri, 2009-01-02 at 10:58 -0800, James wrote:
> Lars - Thanks for that - I now see that I'm getting the following
> error:
> 
> (ERROR ··@<There is no applicable method for the generic function
> ~2I~_~S~\n          ~I~_when called with arguments ~2I~_~S.~:>")
> [:EXTERNAL]
> 
> 
> Now I just have to figure out WHY I'm getting the error...
> 


Hmm, that's a pretty obscure error message. Something tells me you
haven't pasted the actual message itself here. You are looking at the
code or function call (some point in the stack/back-trace) which
_generates_ the error message.

The message itself should be at the top (in Slime), then the back-trace
should follow below.
From: James
Subject: Re: newbie question
Date: 
Message-ID: <67677cdd-a11f-4675-a0f6-17e3c3ba7789@z28g2000prd.googlegroups.com>
The message is:  There is no standard applicable message for the
generic function

> The message itself should be at the top (in Slime), then the back-trace
> should follow below.
From: James
Subject: Re: newbie question
Date: 
Message-ID: <77266c70-b2b5-4093-9b5e-ede23353ad2c@e10g2000vbe.googlegroups.com>
Resolved (and I am an idiot!)!

Lars gave the thread that eventually unraveled the the issue,
Hunchentoot was returning:

"There is no standard applicable message for the generic function"
then it went on to tell me that msgid was nil.

What took so long to penetrate was WHY msgid was nil.  After staring
at the Hunchentoot documentation, staring at my code, surfing the web,
banging my head bloody, I eventually realized that get-parameter
returns a string, and select using msgid needed an integer... add
(parse-integer (get-parameter "message")) and all my troubles went
away!

D'OH!

On Jan 3, 1:56 pm, James <···········@gmail.com> wrote:
> The message is:  There is no standard applicable message for the
> generic function
>
> > The message itself should be at the top (in Slime), then the back-trace
> > should follow below.