Skip to content

Instantly share code, notes, and snippets.

@srid
Created September 21, 2011 17:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srid/1232768 to your computer and use it in GitHub Desktop.
Save srid/1232768 to your computer and use it in GitHub Desktop.
; Access /events in the browser
; Aleph throws an exception:
; java.lang.IllegalArgumentException: No implementation of method: :consumer of
; protocol: #'lamina.core.channel/ChannelProtocol found for class: nil
(ns stackato-doctor.playaleph
(:use compojure.core
ring.middleware.stacktrace
ring.adapter.jetty
lamina.core
aleph.http)
(:require [compojure.route :as route]))
(defn aleph-route [ch request]
(enqueue ch
{:status 200
:headers {"content-type" "text/plain"}
:body "aleph response!!"}))
(defroutes app-routes
(GET "/" [] "This is a regular response.")
(GET "/events" [] (wrap-aleph-handler aleph-route))
(route/not-found "Page not found"))
(def app (wrap-stacktrace app-routes))
@srid
Copy link
Author

srid commented Sep 21, 2011

Exception: java.lang.IllegalArgumentException: No implementation of method: :consumer of protocol: #'lamina.core.channel/ChannelProtocol found for class: nil
              core_deftype.clj:471 clojure.core/-cache-protocol-fn
                    channel.clj:20 lamina.core.channel/eval2035[fn]
                   channel.clj:135 lamina.core.channel/enqueue
                   RestFn.java:423 clojure.lang.RestFn.invoke
                      Var.java:369 clojure.lang.Var.invoke
                  playaleph.clj:24 stackato-doctor.playaleph/aleph-route
                       http.clj:45 aleph.http/wrap-aleph-handler[fn]
                   response.clj:26 compojure.response/eval964[fn]
                   response.clj:10 compojure.response/eval925[fn]
                  playaleph.clj:32 stackato-doctor.playaleph/fn
                       core.clj:39 compojure.core/if-route[fn]
                       core.clj:24 compojure.core/if-method[fn]
                       core.clj:98 compojure.core/routing[fn]
                     core.clj:2053 clojure.core/some
                       core.clj:98 compojure.core/routing
                   RestFn.java:139 clojure.lang.RestFn.applyTo
                      core.clj:542 clojure.core/apply
                      core.clj:103 compojure.core/routes[fn]
                 stacktrace.clj:15 ring.middleware.stacktrace/wrap-stacktrace-log[fn]
                 stacktrace.clj:79 ring.middleware.stacktrace/wrap-stacktrace-web[fn]
                      Var.java:365 clojure.lang.Var.invoke
                 stacktrace.clj:15 ring.middleware.stacktrace/wrap-stacktrace-log[fn]
                 stacktrace.clj:79 ring.middleware.stacktrace/wrap-stacktrace-web[fn]
            reload_modified.clj:15 ring.middleware.reload-modified/wrap-reload-modified[fn]
                 stacktrace.clj:15 ring.middleware.stacktrace/wrap-stacktrace-log[fn]
                 stacktrace.clj:79 ring.middleware.stacktrace/wrap-stacktrace-web[fn]
                      jetty.clj:16 ring.adapter.jetty/proxy-handler[fn]
                  (Unknown Source) ring.adapter.jetty.proxy$org.mortbay.jetty.handler.AbstractHandler$0.handle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment