Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

cdeszaq opened this issue Nov 29, 2012 · 3 comments

Comments

@cdeszaq
Copy link

cdeszaq commented Nov 29, 2012

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
Copy link
Owner

Hi Rick,

Thanks for the bug report. I will take a look this week.

Jeff

On 11/29/12 5:14 PM, Rick Jensen wrote:

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: 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"
 }

}


Reply to this email directly or view it on GitHub
#6.

@ghost ghost assigned jeffellis Dec 30, 2012
@hugheba
Copy link

hugheba commented Jan 15, 2013

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 added a commit that referenced this issue Jan 21, 2013
@jeffellis
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants