logging - 为插件配置动态方法时出错[logging:1.3.7]:无法添加新方法[getLog]

标签 logging grails grails-plugin

Grails 1.3.7
启动时,出现以下错误:

Running Grails application.. 2011-04-22 09:38:17,828 [main] ERROR plugins.DefaultGrailsPluginManager - Error configuring dynamic methods for plugin [logging:1.3.7]: Cannot add new method [getLog] for arguments [[]]. It already exists! groovy.lang.GroovyRuntimeException: Cannot add new method [getLog] for arguments [[]]. It already exists! at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:212) at grails.web.container.EmbeddableServer$start.call(Unknown Source) at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:158) at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy) at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280) at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy) at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:149) at _GrailsRun_groovy$_run_closure5.call(_GrailsRun_groovy) at _GrailsRun_groovy.runInline(_GrailsRun_groovy:116) at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy) at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:59) at RunApp$_run_closure1.doCall(RunApp.groovy:33) at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381) at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415) at gant.Gant$_dispatch_closure7.doCall(Gant.groovy) at gant.Gant.withBuildListeners(Gant.groovy:427) at gant.Gant.this$2$withBuildListeners(Gant.groovy) at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source) at gant.Gant.dispatch(Gant.groovy:415) at gant.Gant.this$2$dispatch(Gant.groovy) at gant.Gant.invokeMethod(Gant.groovy) at gant.Gant.executeTargets(Gant.groovy:590) at gant.Gant.executeTargets(Gant.groovy:589)

最佳答案

鉴于您提供的上下文信息很少,因此很难提供任何帮助。我最好的猜测是日志记录插件正在尝试将log属性或getLog()方法添加到您的一个类(很可能是 Controller ,服务或域),但是您已经在同一类中声明了此属性/方法。

关于logging - 为插件配置动态方法时出错[logging:1.3.7]:无法添加新方法[getLog],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5751527/

相关文章:

java - 正在生成多个日志文件

java - vert.x 的logging.properties 中的含义是什么?

ruby-on-rails - 您会为 rails/grails 应用程序推荐什么建模技术/工具/图表?

google-app-engine - Grails1.4M1 + GAE + gorm-jpa 不起作用

grails - 在grails应用程序之间共享resources.groovy

logging - logback 日志中的文本长度限制

tomcat - 为在 tomcat 中运行的 grails 应用程序动态重新加载 log4j.properties

grails - 如何从grails中的 Controller 操作中搜索驱动器中的文件夹?

grails - 如何将软管鸟客户端库集成到Grails项目?

session - 注销时具有数据库 session 1.2.0和Spring安全核心的Grails 2.1中的InvalidatedSessionException