2016-08-15 6 views
0

Clojureを初めて使用しており、Leiningenを使用してClojureプロジェクトを管理しています。私は含まれてClojure Couchbase依存性の問題

私はCouchbaseのバケットに接続したい:

lein deps 

:私も走ったGitHubのレポhttps://github.com/otabat/couchbase-clj

に述べたように、私のproject.cljで

[couchbase-clj "0.2.0"] 

私の依存関係をインストールするには、Leiningenのガイドによれば、私が依存関係をダウンロードした場合は、自動的に がダウンロードされます。 https://github.com/technomancy/leiningen/blob/stable/doc/TUTORIAL.md#dependencies

は、だから、私はcore.cljのコード

(ns first-app.core 
(:gen-class :main true)) 

(:require [couchbase-clj.client :as c])) 

(c/defclient client {:bucket "subgate" 
       :uris ["http://127.0.0.1:8091"]}) 

(defn -main 
    "I don't do a whole lot ... yet." 
    [& args] 
    (println "Hello, World! ")) 

しかし、私は実行して、次する必要があります。

lein run 

を私はエラーを取得する:ここで

Exception in thread "main" java.lang.ClassNotFoundException: couchbase-clj.client, compiling:(first_app/core.clj:4:3) 

は私です依存ツリー:

[cider/cider-nrepl "0.8.1"] 
[cljs-tooling "0.1.3" :exclusions [[org.clojure/clojure]]] 
[compliment "0.2.0" :exclusions [[org.clojure/clojure]]] 
[org.clojure/java.classpath "0.2.0" :exclusions [[org.clojure/clojure]]] 
[org.clojure/tools.namespace "0.2.5" :exclusions [[org.clojure/clojure]]] 
[org.clojure/tools.trace "0.7.8" :exclusions [[org.clojure/clojure]]] 
[org.tcrawley/dynapath "0.2.3" :exclusions [[org.clojure/clojure]]] 
[clojure-complete "0.2.4" :exclusions [[org.clojure/clojure]]] 
[couchbase-clj "0.2.0"] 
[com.couchbase.client/couchbase-client "1.3.2"] 
    [commons-codec "1.5"] 
    [io.netty/netty "3.5.5.Final"] 
    [net.spy/spymemcached "2.10.5"] 
    [org.apache.httpcomponents/httpcore-nio "4.3"] 
    [org.apache.httpcomponents/httpcore "4.3"] 
    [org.codehaus.jettison/jettison "1.1"] 
    [stax/stax-api "1.0.1"] 
[org.clojure/data.json "0.2.4"] 
[org.clojure/clojure "1.8.0"] 
[org.clojure/tools.nrepl "0.2.12" :exclusions [[org.clojure/clojure]]] 

私はClojureを初めて使っているので、どんなヒントも歓迎します! ありがとうございます。

答えて

0

ns区切り文字の前に自分のrequireを含める必要がありました。 Redditに

にmoxajする

(ns first-app.core 
    (:gen-class :main true) 
    (:require [couchbase-clj.client :as c])) 

感謝