【问题标题】:Play Morphia MongoDB : The type Filter is already defined玩 Morphia MongoDB:类型过滤器已经定义
【发布时间】:2011-10-27 21:02:27
【问题描述】:

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

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

【问题讨论】:

    标签: java mongodb playframework morphia


    【解决方案1】:

    当从 application.conf 和 dependencies.yml 加载 morphia 模块时会发生此问题

    要解决它,请转到您的 application.conf 并注释掉“加载”下面的行 morphia 模块”,然后重新启动播放。

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-02-13
      • 1970-01-01
      • 2013-06-16
      • 1970-01-01
      • 2016-11-11
      • 1970-01-01
      • 2018-07-08
      相关资源
      最近更新 更多