2014-02-19 39 views
1

當我創建lein new PROJECT一個新的項目,然後從內調用雷音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) 

任何想法可能什麼呢?我的項目在當天早些時候工作正常。

謝謝!

+1

您是否使用全名大寫字母的名稱創建項目? – ChrisDevo

回答

0

最後,我刪除了我的Maven倉庫中的Clojure核心jar文件(~/.m2)。當我再次啓動這個項目時,Leiningen拉下了罐子,一切都奏效了!其中一個文件必須已被損壞:/

2

也許一個示例會有助於發現問題:

 
[email protected]:~$ 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. 

[email protected]:~$ 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`. 
[email protected]:~$ cd PROJECT/ 
[email protected]:~/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 [email protected]:~/PROJECT$ 
[email protected]:~/PROJECT$ lein version 
Leiningen 2.3.4 on Java 1.7.0_40 Java HotSpot(TM) 64-Bit Server VM 
[email protected]:~/PROJECT$ 
  • 是否使用雷音2.3.x版本+?如果不嘗試lein升級
  • 你在正確的目錄中運行lein repl嗎?
  • lein deps能否成功下載它需要的一切?
  • 做lein版本的工作(即:leiningen完全破碎)如果它不起作用,請刪除〜/ .lein並再次運行它。
+0

感謝您的建議。我嘗試更新Lein無濟於事,我的所有其他項目都被破壞了。只有在Maven回購庫中刪除Clojure核心才能解決問題。 – elSnape