2012-07-25 18 views
0

使用Play 2.0.2框架時,遇到類加載器衝突。看起來在不同的類加載器中有相同類的兩個定義。在控制檯上運行,但是當我發出「運行」命令,玩迴應:類加載器衝突,不同類定義

java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "play.api.PlayException.cause()Lscala/Option;" 
the class loader (instance of sbt/PlayCommands$$anonfun$61$$anonfun$63$$anon$2) of the current class, play/api/PlayException, 
and the class loader (instance of java/net/URLClassLoader) for interface 
play/api/PlayException$UsefulException have different Class objects for the 
type scala/Option used in the signature 

任何人有一個好的開始調試這?或者有些想法爲什麼會發生這種情況?顯然這個類正在被不同的裝載器加載,但是我不熟悉這個play loader配置。

我有使用端口

sbt @0.11.2_0 (active) 
scala2.9 @2.9.2_0 (active) 

我的道路港口二進制文件之前已安裝玩斯卡拉& SBT。

使用Java

java version "1.6.0_33" 
Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-10M3720) 
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode) 

運行雪豹

回答

0

原來的端口SBT創造了一個〜/名.bst目錄和配置是首選。刪除/移動該目錄到別的東西可以解決問題。