I think I tracked the problem down. In my handler I define my routes, which 
calls enlive/deftemplate, which is a macro. 
Now, if I understand this right, the macro will be called at compile time, 
when noir.session is not available yet. Is that right?

How can I get around this?



Am Sonntag, 23. März 2014 23:23:39 UTC+1 schrieb Sven Richter:
>
> Hi Sean,
>
> I am using a luminusweb project. So yes, noir.session gets initialized and 
> is working. I was testing that before to get a feeling for noir.session at 
> all.
> So could this be a timing issue? Trying to access the session before it is 
> initialized?
>
> Thanks,
> Sven
>
> Am Sonntag, 23. März 2014 23:14:33 UTC+1 schrieb Sean Corfield:
>>
>> Looks like the Noir session isn't initialized. Have you added the 
>> wrap-noir-session middleware? 
>>
>> Sean 
>>
>> On Mar 23, 2014, at 2:54 PM, Sven Richter <sve...@googlemail.com> wrote: 
>> > I have an error message that I just dont understand. This is what I am 
>> trying to do: 
>> > 
>> > (ns service) 
>> > (defn get-id [] (session/get :id)) 
>> > 
>> > (ns http) 
>> > (defn get-it [] (parse-string (:body (client/get 
>> >                                       (str 
>> >                                         base-url 
>> >                                         
>> "rest/api/2/search?jql=issuetype=Epos&status!=closed&maxResults=1000&JSESSIONID="
>>  
>>
>> >                                         (service/get-id))         
>>  ;this is there the error occurs 
>> >                                    :accept :json})))) 
>> > 
>> > Now, when I startup ring I get the following error: 
>> > 
>> > Exception in thread "main" java.lang.ClassCastException: 
>> clojure.lang.Var$Unbound cannot be cast to java.util.concurrent.Future 
>> >         at clojure.core$deref_future.invoke(core.clj:2108) 
>> >         at clojure.core$deref.invoke(core.clj:2129) 
>> >         at noir.session$get.invoke(session.clj:24) 
>> >         at lweb.services.jira$get_jira_session_id.invoke(jira.clj:17) 
>> >         at lweb.services.epic$get_epics.invoke(epic.clj:19) 
>> >         at lweb.services.epic$get_epic_sp_map.invoke(epic.clj:40) 
>> >         at lweb.services.epic$eval10850.invoke(epic.clj:43) 
>>
>>
>>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to