On Tuesday, April 30, 2013 6:25:11 AM UTC-7, Tassilo Horn wrote:
>
> David Toomey <[email protected] <javascript:>> writes:
>
> Hi David,
>
> > The error, as mentioned in the title: java.lang.ClassCastException:
> > clojure.lang.Var$Unbound cannot be cast to clojure.lang.Atom
>
> In which line?
>
> The error is where the bolded is. It may have been confusing on the OP
because I accidentally posted the test-case on not the real code:
(defn do-login [handle passwd]
(let [tuser (select db/allusers
(fields :username :password :usertype)
(where {:username handle}))]
(if (crypt/compare passwd
(let [[{pwd :password}] tuser]
pwd))
;;;;;;;;;;;;;ERROR:
(do *(sesh/put! :uname handle)*
(response/redirect "/"))
(response/redirect "/"))))
> Hm, the message tells that you are using an atom function like swap! on
> something that's not an Atom but Unbound. But your code doesn't contain
> such a coll. So I guess it's in the SQL Korma code here
> where db/allusers is Unbound.
>
>
No, that part and the bcrypt comparision passes. Regardless, Korma does not
use atoms. The problem is with the noir.session namespace and the error
revolves around (sesh/put!). As I understand it, the noir.session namespace
uses an atom.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.