Mongo morphia插件

时间:2016-12-23 08:38:10

标签: mongodb grails

在通过ant构建我的grails应用程序时,我遇到以下错误:

  Compiling 2 source files
  [groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  [groovyc] /home/e01188/cm_data/grm/target/work/plugins/mongodb-morphia-0.8.2/src/groovy/grails/plugins/mongodb/ast/MongoDomainASTTransformation.groovy: 22: unable to resolve class com.google.code.morphia.annotations.Transient
  [groovyc]  @ line 22, column 1.
  [groovyc]    import com.google.code.morphia.annotations.Transient
  [groovyc]    ^
  [groovyc]
  [groovyc] /home/e01188/cm_data/grm/target/work/plugins/mongodb-morphia-0.8.2/src/groovy/grails/plugins/mongodb/ast/MongoDomainASTTransformation.groovy: 12: unable to resolve class com.google.code.morphia.annotations.Embedded
  [groovyc]  @ line 12, column 1.
  [groovyc]    import com.google.code.morphia.annotations.Embedded;
  [groovyc]    ^
  [groovyc]
  [groovyc] /home/e01188/cm_data/grm/target/work/plugins/mongodb-morphia-0.8.2/src/groovy/grails/plugins/mongodb/ast/MongoDomainASTTransformation.groovy: 13: unable to resolve class com.google.code.morphia.annotations.Id. I have added the zip file in lib folder of the project. 
  [groovyc]  @ line 13, column 1.
  [groovyc]    import com.google.code.morphia.annotations.Id
  [groovyc]    ^
  [groovyc]
  [groovyc] /home/e01188/cm_data/grm/target/work/plugins/mongodb-morphia-0.8.2/src/groovy/grails/plugins/mongodb/ast/MongoDomainASTTransformation.groovy: 14: unable to resolve class com.google.code.morphia.annotations.Version
  [groovyc]  @ line 14, column 1.
  [groovyc]    import com.google.code.morphia.annotations.Version
  [groovyc]    ^
  [groovyc]
  [groovyc] /home/e01188/cm_data/grm/target/work/plugins/mongodb-morphia-0.8.2/src/groovy/grails/plugins/mongodb/ast/MongoDomainASTTransformation.groovy: 25: unable to resolve class org.bson.types.ObjectId
  [groovyc]  @ line 25, column 1.
  [groovyc]    import org.bson.types.ObjectId
  [groovyc]    ^
  [groovyc]
  [groovyc] /home/e01188/cm_data/grm/target/work/plugins/mongodb-morphia-0.8.2/src/groovy/grails/plugins/mongodb/ast/MongoDomainASTTransformation.groovy: 20: unable to resolve class com.google.code.morphia.annotations.Entity
  [groovyc]  @ line 20, column 1.
  [groovyc]    import com.google.code.morphia.annotations.Entity
  [groovyc]    ^
  [groovyc]
| Compiling 2 source files.
| Error Error executing plugin mongodb-morphia-0.8.2 script: target/work/plugins/mongodb-morphia-0.8.2/scripts/_Install.groovy

虽然没有任何版本问题,因为我使用的是grails 2.4.3和插件mongodb-morphia-0.8.2。它在本地系统窗口上运行顺畅。但是不能在linux平台上工作。这两个环境都具有与grails 2.4.3和mongodb-morphia-0.8.2相同的配置,但在linux中,构建失败并出现上述错误。请帮忙,我坚持了两天。

有一点我注意到,mongodb-morphia-ast.jar存在于Windows上的目标路径中,但此jar在Linux上的目标中不可见。提前致谢。

0 个答案:

没有答案