当我使用lein new PROJECT
创建一个新项目然后从内部调用lein repl时,我得到以下异常:
Exception in thread "main" java.lang.ExceptionInInitializerError
at clojure.main.<clinit>(main.java:20)
Caused by: java.lang.IllegalStateException: Attempting to call unbound fn: #'clojure.core/refer
at clojure.lang.Var$Unbound.throwArity(Var.java:43)
at clojure.lang.AFn.invoke(AFn.java:39)
at clojure.lang.Var.invoke(Var.java:415)
at clojure.lang.RT.doInit(RT.java:460)
at clojure.lang.RT.<clinit>(RT.java:329)
... 1 more
Exception in thread "Thread-4" clojure.lang.ExceptionInfo: Subprocess failed {:exit-code 1}
at clojure.core$ex_info.invoke(core.clj:4327)
知道可能会发生什么吗?我的项目在当天早些时候工作正常。
谢谢!
答案 0 :(得分:2)
也许一个有效的例子可以帮助发现问题:
arthur@a:~$ lein new PROJECT Project names containing uppercase letters are not recommended and will be rejected by repositories like Clojars and Central. If you're truly unable to use a lowercase name, please set the LEIN_BREAK_CONVENTION environment variable and try again. arthur@a:~$ LEIN_BREAK_CONVENTION=true lein new PROJECT Generating a project called PROJECT based on the 'default' template. To see other templates (app, lein plugin, etc), try `lein help new`. arthur@a:~$ cd PROJECT/ arthur@a:~/PROJECT$ lein repl nREPL server started on port 47462 REPL-y 0.3.0 Clojure 1.5.1 Docs: (doc function-name-here) (find-doc "part-of-name-here") Source: (source function-name-here) Javadoc: (javadoc java-object-or-class-here) Exit: Control+D or (exit) or (quit) user=> Bye for now!arthur@a:~/PROJECT$ arthur@a:~/PROJECT$ lein version Leiningen 2.3.4 on Java 1.7.0_40 Java HotSpot(TM) 64-Bit Server VM arthur@a:~/PROJECT$
答案 1 :(得分:0)
最后,我删除了maven存储库(~/.m2
)中的Clojure核心jar文件。当我再次推出这个项目时,莱宁根拉下了罐子,一切正常!其中一个文件必须以某种方式损坏:/