让Stagemonitor使用Grails 2.5?

时间:2015-05-27 21:02:00

标签: grails

我试图让www.stagemonitor.org与Grails合作。

我在这里创建了一个示例项目:https://github.com/jbwiv/teststagemonitor

我已将stage监视器添加到grails-app / conf / BuildConfig.groovy作为编译和运行时依赖项。它确实在调用" grails refresh-dependencies"之后安装到我的maven目录中:

/home/user/.m2/repository/org/stagemonitor
/home/user/.m2/repository/org/stagemonitor/stagemonitor-requestmonitor
/home/user/.m2/repository/org/stagemonitor/stagemonitor-requestmonitor/0.13.0
/home/user/.m2/repository/org/stagemonitor/stagemonitor-requestmonitor/0.13.0/stagemonitor-requestmonitor-0.13.0.pom.sha1
/home/user/.m2/repository/org/stagemonitor/stagemonitor-requestmonitor/0.13.0/_remote.repositories
/home/user/.m2/repository/org/stagemonitor/stagemonitor-requestmonitor/0.13.0/stagemonitor-requestmonitor-0.13.0.jar
/home/user/.m2/repository/org/stagemonitor/stagemonitor-requestmonitor/0.13.0/stagemonitor-requestmonitor-0.13.0.pom
/home/user/.m2/repository/org/stagemonitor/stagemonitor-requestmonitor/0.13.0/stagemonitor-requestmonitor-0.13.0.jar.sha1
/home/user/.m2/repository/org/stagemonitor/stagemonitor-jvm
/home/user/.m2/repository/org/stagemonitor/stagemonitor-jvm/0.13.0
/home/user/.m2/repository/org/stagemonitor/stagemonitor-jvm/0.13.0/stagemonitor-jvm-0.13.0.pom.sha1
/home/user/.m2/repository/org/stagemonitor/stagemonitor-jvm/0.13.0/_remote.repositories
/home/user/.m2/repository/org/stagemonitor/stagemonitor-jvm/0.13.0/stagemonitor-jvm-0.13.0.jar
/home/user/.m2/repository/org/stagemonitor/stagemonitor-jvm/0.13.0/stagemonitor-jvm-0.13.0.jar.sha1
/home/user/.m2/repository/org/stagemonitor/stagemonitor-jvm/0.13.0/stagemonitor-jvm-0.13.0.pom
/home/user/.m2/repository/org/stagemonitor/stagemonitor-javaagent
/home/user/.m2/repository/org/stagemonitor/stagemonitor-javaagent/0.13.0
/home/user/.m2/repository/org/stagemonitor/stagemonitor-javaagent/0.13.0/stagemonitor-javaagent-0.13.0.pom
/home/user/.m2/repository/org/stagemonitor/stagemonitor-javaagent/0.13.0/_remote.repositories
/home/user/.m2/repository/org/stagemonitor/stagemonitor-javaagent/0.13.0/stagemonitor-javaagent-0.13.0.jar.sha1
/home/user/.m2/repository/org/stagemonitor/stagemonitor-javaagent/0.13.0/stagemonitor-javaagent-0.13.0.pom.sha1
/home/user/.m2/repository/org/stagemonitor/stagemonitor-javaagent/0.13.0/stagemonitor-javaagent-0.13.0.jar
/home/user/.m2/repository/org/stagemonitor/stagemonitor-web
/home/user/.m2/repository/org/stagemonitor/stagemonitor-web/0.13.0
/home/user/.m2/repository/org/stagemonitor/stagemonitor-web/0.13.0/stagemonitor-web-0.13.0.jar
/home/user/.m2/repository/org/stagemonitor/stagemonitor-web/0.13.0/_remote.repositories
/home/user/.m2/repository/org/stagemonitor/stagemonitor-web/0.13.0/stagemonitor-web-0.13.0.pom.sha1
/home/user/.m2/repository/org/stagemonitor/stagemonitor-web/0.13.0/stagemonitor-web-0.13.0.jar.sha1
/home/user/.m2/repository/org/stagemonitor/stagemonitor-web/0.13.0/stagemonitor-web-0.13.0.pom
/home/user/.m2/repository/org/stagemonitor/stagemonitor-os
/home/user/.m2/repository/org/stagemonitor/stagemonitor-os/0.13.0
/home/user/.m2/repository/org/stagemonitor/stagemonitor-os/0.13.0/stagemonitor-os-0.13.0.jar.sha1
/home/user/.m2/repository/org/stagemonitor/stagemonitor-os/0.13.0/_remote.repositories
/home/user/.m2/repository/org/stagemonitor/stagemonitor-os/0.13.0/stagemonitor-os-0.13.0.pom.sha1
/home/user/.m2/repository/org/stagemonitor/stagemonitor-os/0.13.0/stagemonitor-os-0.13.0.pom
/home/user/.m2/repository/org/stagemonitor/stagemonitor-os/0.13.0/stagemonitor-os-0.13.0.jar
/home/user/.m2/repository/org/stagemonitor/stagemonitor-jdbc
/home/user/.m2/repository/org/stagemonitor/stagemonitor-jdbc/0.13.0
/home/user/.m2/repository/org/stagemonitor/stagemonitor-jdbc/0.13.0/_remote.repositories
/home/user/.m2/repository/org/stagemonitor/stagemonitor-jdbc/0.13.0/stagemonitor-jdbc-0.13.0.pom.sha1
/home/user/.m2/repository/org/stagemonitor/stagemonitor-jdbc/0.13.0/stagemonitor-jdbc-0.13.0.jar.sha1
/home/user/.m2/repository/org/stagemonitor/stagemonitor-jdbc/0.13.0/stagemonitor-jdbc-0.13.0.pom
/home/user/.m2/repository/org/stagemonitor/stagemonitor-jdbc/0.13.0/stagemonitor-jdbc-0.13.0.jar
/home/user/.m2/repository/org/stagemonitor/stagemonitor-core
/home/user/.m2/repository/org/stagemonitor/stagemonitor-core/0.13.0
/home/user/.m2/repository/org/stagemonitor/stagemonitor-core/0.13.0/_remote.repositories
/home/user/.m2/repository/org/stagemonitor/stagemonitor-core/0.13.0/stagemonitor-core-0.13.0.pom.sha1
/home/user/.m2/repository/org/stagemonitor/stagemonitor-core/0.13.0/stagemonitor-core-0.13.0.jar
/home/user/.m2/repository/org/stagemonitor/stagemonitor-core/0.13.0/stagemonitor-core-0.13.0.pom
/home/user/.m2/repository/org/stagemonitor/stagemonitor-core/0.13.0/stagemonitor-core-0.13.0.jar.sha1

我还在src / java中放置了一个stagemonitor.properties文件,该文件在运行时被移动到target / work / resources / stagemonitor.properties。我相信我已正确配置了该属性文件。

我已经安装了Grails用于web.xml的模板,并进行了修改以确保生成的web.xml中不存在metadata-complete = true。

然而,在grails run-app之后导航到http://localhost:8080/main/index,我按预期获得了我的索引页面,但没有要点击的stagemonitor图标,看起来没有包含Stagemonitor资产。

1 个答案:

答案 0 :(得分:1)

它似乎与Grails不兼容。如果启用日志记录

log4j.main = {
   error 'org.codehaus.groovy.grails',
         'org.springframework',
         'org.hibernate',
         'net.sf.ehcache.hibernate'
   info 'org.stagemonitor'
}

你会看到一堆错误堆栈跟踪似乎暗示他们使用Javassist连接跟踪代码的方式与Groovy和/或Grails使用的AST转换不兼容:

org.stagemonitor.javassist.NotFoundException: stagemonitortest.PersonController$setErrors
...
org.stagemonitor.javassist.NotFoundException: stagemonitortest.PersonController$getParams$0
...
org.stagemonitor.javassist.NotFoundException: stagemonitortest.Person$count
...
org.stagemonitor.javassist.NotFoundException: stagemonitortest.Person$list$0
...
org.stagemonitor.javassist.NotFoundException: stagemonitortest.PersonController$respond$1