I use
(defn get-conn []
(let [conn (make-connection (:database db-config)
:host (:host db-config)
:port (:port db-config)
(mongo-options :auto-connect-retry true))]
(auth conn)
conn))
try to connect to mongos, but
(with-mongo conn
(apply fetch (concat '(:collection) args))))
always has exception, any one know why?
java.lang.NullPointerException
at com.mongodb.DBCursor._check(DBCursor.java:365)
at com.mongodb.DBCursor._hasNext(DBCursor.java:459)
at com.mongodb.DBCursor.hasNext(DBCursor.java:484)
at clojure.lang.IteratorSeq.create(IteratorSeq.java:27)
at clojure.lang.RT.seqFrom(RT.java:495)
at clojure.lang.RT.seq(RT.java:486)
at clojure.core$seq.invoke(core.clj:133)
at clojure.core$map$fn__4215.invoke(core.clj:2479)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
at clojure.lang.LazySeq.seq(LazySeq.java:60)
--
--
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.