clojure - lein run command raises exception -
once added 1 more namespace in (toy) project 1 exception raised after starting server:
lein run
i copying below project.clj file.
(defproject compoj02 "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.6.0"] [ring "1.3.1"] [compojure "1.2.1"] [clout "2.0.0"] [enlive "1.1.5"] [org.clojure/data.csv "0.1.2"] ;[org.clojure/data.csv] ] :main compoj02.core)
the error
exception in thread "main" java.io.filenotfoundexception: not locate clojure/data/csv__init.class or clojure/data/csv.clj on classpath: , compiling:(compoj02/pompaq.clj:1:1) @ clojure.lang.compiler.load(compiler.java:7142)
the new namespace contains 1 simple function:
(ns compoj02.pompaq (:require [clojure.data.csv :as csv] [clojure.data.io :as iov])) (defn process-csv [file] (with-open [in-file (iov/reader file)] (doall (csv/read-csv in-file))))
thanks reading!
ps. adding few details.i executed command lein deps. also, there chain of files: core.clj uses reference templates.clj , 1 uses reference pompaq.clj. when comment out declaration (:use compoj02.pompaq) used in namespace of templates.clj, able start application via lein run.
try lein deps
make sure there. also, without -main
function, command should =>
lein run -m compoj02.pompaq/process-csv file-arg-here
Comments
Post a Comment