gpt4 book ai didi

java - 玩 Morphia MongoDB : The type Filter is already defined

转载 作者:行者123 更新时间:2023-11-30 04:57:58 26 4
gpt4 key购买 nike

当尝试使用 Morphia for MongoDB 启动 Play Java 应用程序时,我得到以下堆栈跟踪,这是由已编译的 Filter 类型的重新编译引起的:

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!)
~ ...

最佳答案

当从 application.conf 和 dependency.yml 加载吗啡模块时,会发生此问题

要解决这个问题,请转到您的 application.conf 并注释掉“load”下面的行吗啡模块”,然后重新启动 Play。

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

关于java - 玩 Morphia MongoDB : The type Filter is already defined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7922372/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com