2011-10-27 22 views
1

當試圖啓動與嗎啡一玩Java應用程序MongoDB的,我得到以下堆棧跟蹤,造成過濾器類型的重新編譯已編譯:播放嗎啡的MongoDB:式過濾器已被定義

Internal Server Error (500) for request GET/

Compilation error (In {module:morphia-1.2.3d}/app/morphia/Filter.java around line 8) 
The file {module:morphia-1.2.3d}/app/morphia/Filter.java could not be compiled. Error raised is : The type Filter is already defined 

play.exceptions.CompilationException: The type Filter is already defined at play.classloading.ApplicationCompiler$2.acceptResult(ApplicationCompiler.java:246) 
     at org.eclipse.jdt.internal.compiler.Compiler.handleInternalException(Compiler.java:672) 
     at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:516) 
     at play.classloading.ApplicationCompiler.compile(ApplicationCompiler.java:278) 
     at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:412) 
     at play.Play.start(Play.java:485) 
     at play.Play.detectChanges(Play.java:599) 
     at play.Invoker$Invocation.init(Invoker.java:186) 
     at Invocation.HTTP Request(Play!) 
~ ... 

回答

2

發生此問題時,嗎啡模塊正在從兩個application.conf加載和dependencies.yml

要解決它,去你application.conf並註釋掉下面的「負荷 嗎啡模塊」行了,然後重啓播放。

# load morphia module 
#module.morphia=${play.path}/modules/morphia-1.2.3d