7

获取 java.lang.IllegalArgumentException:没有实现方法::协议文件:#'clojure.java.io/Coercions 当我从 MAC 上的终端运行 lein test 或 lein repl 时为类:clojure.lang.PersistentVector OS X. 虽然 lein repl 在 Eclipse 中运行良好(带有逆时针插件)

我的项目文件是:

(defproject cmp "0.1.0-SNAPSHOT"

  :description "FIXME: write description"

  :url "http://example.com/FIXME"

  :license {:name "Eclipse Public License"

            :url "http://www.eclipse.org/legal/epl-v10.html"}

  :dependencies [[org.clojure/clojure "1.5.1"]

                 [lib-noir "0.5.0"]
                 [compojure "1.1.5"]
                 [ring-server "0.2.7"]
                 [clabango "0.5"]
                 [korma "0.3.0-RC5"]
                 [clj-json "0.5.3"] 
                 [mysql/mysql-connector-java "5.1.6"]
                 [com.taoensso/timbre "1.5.2"]
                 [com.taoensso/tower "1.5.1"]
                 [com.postspectacular/rotor "0.1.0"]
                 [markdown-clj "0.9.19"]
                 [clj-pdf "1.11.1"]
                 [dk.ative/docjure "1.6.0"]
                 [com.cemerick/friend "0.1.5"]
                 [ring-basic-authentication "1.0.2"]
                 [org.clojure/data.csv "0.1.2"]
                 [clojure-csv/clojure-csv "2.0.1"]
                 [clj-time "0.6.0"]
                 [log4j "1.2.15"
                  :exclusions
                  [javax.mail/mail
                   javax.jms/jms
                   com.sun.jdmk/jmxtools
                   com.sun.jmx/jmxri]]]
    :plugins [[lein-ring "0.8.3"]]

    :ring {:handler cmp.handler/war-handler

         :init    cmp.handler/init
         :destroy cmp.handler/destroy }

     :profiles {
         :production {
               :ring {:open-browser? false
                       :stacktraces?  false
                       :auto-reload?  false}}

        :dev {:dependencies [[ring-mock "0.1.3"]
                        [ring/ring-devel "1.1.8"]]}}

     :java-source-paths [["src/cmp/java"]]
     :min-lein-version "2.0.0")
4

1 回答 1

7

:java-source-paths你下面的条目project.clj是一个嵌套向量。它应该是字符串的普通向量。尝试更换

:java-source-paths [["src/cmp/java"]]

和:

:java-source-paths ["src/cmp/java"]
于 2013-09-24T08:07:07.653 回答