Metrics servlet broken in Grails v2.2.0-RC2 #6

Closed
cdeszaq opened this Issue Nov 29, 2012 · 3 comments

Projects

None yet

3 participants

@cdeszaq

Error message when accessing /metrics:

| Error 2012-11-29 16:04:08,397 [http-bio-9090-exec-8] ERROR [/PerformanceEvaluations].[YammerMetrics]  - Allocate exception for servlet YammerMetrics
Message: (class: com/yammer/metrics/reporting/GrailsAdminServlet, method: <init> signature: ()V) Expecting to find object/array on stack
    Line | Method
->> 2404 | privateGetDeclaredConstructors in java.lang.Class
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   2714 | getConstructor0                in     ''
|    343 | newInstance0 . . . . . . . . . in     ''
|    325 | newInstance                    in     ''
|   1110 | runWorker . . . . . . . . . .  in java.util.concurrent.ThreadPoolExecutor
|    603 | run                            in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run . . . . . . . . . . . . .  in java.lang.Thread

This is a basic install with some other plugins installed as well. No domain classes or services or controllers other than the defaults.

BuildConfig.groovy:

grails.servlet.version = "2.5" // Change depending on target container compliance (2.5 or 3.0)
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
//grails.project.war.file = "target/${appName}-${appVersion}.war"

// uncomment (and adjust settings) to fork the JVM to isolate classpaths
//grails.project.fork = [
//   run: [maxMemory:1024, minMemory:64, debug:false, maxPerm:256]
//]

grails.project.dependency.resolution = {
    // inherit Grails' default dependencies
    inherits("global") {
        // specify dependency exclusions here; for example, uncomment this to disable ehcache:
        // excludes 'ehcache'
    }
    log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
    checksums true // Whether to verify checksums on resolve

    repositories {
        inherits true // Whether to inherit repository definitions from plugins

        grailsPlugins()
        grailsHome()
        grailsCentral()

        mavenLocal()
        mavenCentral()

        // uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
        //mavenRepo "http://snapshots.repository.codehaus.org"
        //mavenRepo "http://repository.codehaus.org"
        //mavenRepo "http://download.java.net/maven/2/"
        //mavenRepo "http://repository.jboss.com/maven2/"
    }

    dependencies {
        // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.

        // Allows connecting to MySQL DBs
        runtime 'mysql:mysql-connector-java:5.1.21'

        // For JodaTime plugin
        compile "org.jadira.usertype:usertype.jodatime:1.9"

        // So that spock can work with Grails 2.2
        test "org.spockframework:spock-grails-support:0.7-groovy-2.0"
    }

    plugins {
        // Server
        build ":tomcat:$grailsVersion"

        // Testing
        test(":spock:0.7") {
            exclude "spock-grails-support"
        }

        // Metrics, Logging, and Debug
        compile ":yammer-metrics:2.1.2-3" // Currently broken, but would be good to have
        // compile ":profiler:0.4" // Currently broken, but would be good to have
        compile ":grails-melody:1.13"
        compile ":runtime-logging:0.4"
        compile ":console:1.2"

        // Other
        compile ':cache:1.0.1'
        compile ":cache-headers:1.1.5"
        compile ":joda-time:1.4"

        // DB
        runtime ":hibernate:$grailsVersion"
        runtime ":database-migration:1.2"

        // UI
        runtime ":jquery:1.8.3"
        compile ":jquery-ui:1.8.24"
        runtime ":modernizr:2.6.2"
        runtime ":resources:1.1.6"
        runtime ":zipped-resources:1.0"
        runtime ":cached-resources:1.0"
        compile ":fields:1.3"
        compile ":twitter-bootstrap:2.2.1"
    }
}
@jeffellis
Owner
@jeffellis jeffellis was assigned Dec 30, 2012
@hugheba

Still happening on the GM release of Grails 2.2.0

SEVERE: Allocate exception for servlet YammerMetrics
java.lang.VerifyError: (class: com/yammer/metrics/reporting/GrailsAdminServlet, method: signature: ()V) Expecting to find object/array on stack
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
at java.lang.Class.getConstructor0(Class.java:2714)
at java.lang.Class.newInstance0(Class.java:343)
at java.lang.Class.newInstance(Class.java:325)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:134)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1136)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:857)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.valves.CrawlerSessionManagerValve.invoke(CrawlerSessionManagerValve.java:180)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

@jeffellis jeffellis added a commit that referenced this issue Jan 21, 2013
@jeffellis Fixed Issue #6. Qualify the static strings used in the super call fro…
…m GrailsAdminServlet.
e89f2f6
@jeffellis
Owner

Should be fixed in version 2.1.2-4 of the plugin.

@jeffellis jeffellis closed this Jan 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment