Fixing a trivial Clojure Error...
I had this happen to me this morning:
$ lein repl
REPL started; server listening on localhost port 18383
IllegalArgumentException Don't know how to create ISeq from: java.lang.Character clojure.lang.RT.seqFrom (RT.java:494)
clojure.core=> (pst)
IllegalArgumentException Don't know how to create ISeq from: java.lang.Character
clojure.lang.RT.seqFrom (RT.java:494)
clojure.lang.RT.seq (RT.java:475)
clojure.core/seq (core.clj:133)
clojure.core/concat/fn--3804 (core.clj:662)
clojure.lang.LazySeq.sval (LazySeq.java:42)
clojure.lang.LazySeq.seq (LazySeq.java:60)
clojure.lang.Cons.next (Cons.java:39)
clojure.lang.RT.boundedLength (RT.java:1633)
clojure.core/apply (core.clj:603)
clojure.core/load-libs (core.clj:5302)
clojure.core/apply (core.clj:603)
clojure.core/require (core.clj:5381)
nil
clojure.core=>
What the hell, right? Turns out the problem was in my project.clj file! I had defined my main namespace like this: :main "com.ns.core"
But Leinigen wants it defined like this: :main com.ns.core
That is, without the quotes. Silly me! Also silly REPL for a horrible error message. I'm only blogging about this because pasting that error along with "lein repl" into Google didn't give me the solution, so hopefully this helps someone else.
Posted on 2012-10-14 by Jach
Tags: clojure, programming, tips
Permalink: https://www.thejach.com/view/id/269
Trackback URL: https://www.thejach.com/view/2012/10/fixing_a_trivial_clojure_error
yogsototh
February 10, 2014 02:52:24 AM
Thanks! I don't know how I could I found this alone. I wouldn't say silly you, but silly clojure/java error message!
stu
September 21, 2014 03:19:15 AM
Thank you so much!
Anonymous
December 22, 2015 03:22:53 PM
Thanks! You helped me today.