groovy.lang.MissingMethodException: No signature of method: static ch.qos.logback.core.status.OnConsoleStatusListener.addNewInstanceToContext() is applicable for argument types: (ch.qos.logback.classic.LoggerContext) values: [ch.qos.logback.classic.LoggerContext[default]]

QOS.ch JIRA | Kornelis Sietsma | 10 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    If I set {{"-Dlogback.debug=true"}} in my JVM properties, set up a minimal logback.groovy config, and then call org.slf4j.LoggerFactory.getLogger("foo") I get the stack trace below. The root cause seems to be that GafferConfigurator.groovy calls "OnConsoleStatusListener.addNewInstanceToContext(): https://github.com/qos-ch/logback/blob/master/logback-classic/src/main/groovy/ch/qos/logback/classic/gaffer/GafferConfigurator.groovy#L65 Whereas the current OnConsoleStatusListener has no such method, since this change: https://github.com/qos-ch/logback/commit/43877e7aa1bba269488682c5925389d37a2102cd I tried reverting to logback 1.1.5 and the debug flag works fine in that release with groovy config files. Full stack trace is: {code} groovy.lang.MissingMethodException: No signature of method: static ch.qos.logback.core.status.OnConsoleStatusListener.addNewInstanceToContext() is applicable for argument types: (ch.qos.logback.classic.LoggerContext) values: [ch.qos.logback.classic.LoggerContext[default]] at groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1500) at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1486) at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:53) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at ch.qos.logback.classic.gaffer.GafferConfigurator.run(GafferConfigurator.groovy:65) at ch.qos.logback.classic.gaffer.GafferConfigurator$run.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166) at ch.qos.logback.classic.gaffer.GafferConfigurator.run(GafferConfigurator.groovy:44) at ch.qos.logback.classic.gaffer.GafferUtil.runGafferConfiguratorOn(GafferUtil.java:43) at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:67) at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150) at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84) at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:149) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:390) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:340) {code}

    QOS.ch JIRA | 10 months ago | Kornelis Sietsma
    groovy.lang.MissingMethodException: No signature of method: static ch.qos.logback.core.status.OnConsoleStatusListener.addNewInstanceToContext() is applicable for argument types: (ch.qos.logback.classic.LoggerContext) values: [ch.qos.logback.classic.LoggerContext[default]]
  2. 0

    If I set {{"-Dlogback.debug=true"}} in my JVM properties, set up a minimal logback.groovy config, and then call org.slf4j.LoggerFactory.getLogger("foo") I get the stack trace below. The root cause seems to be that GafferConfigurator.groovy calls "OnConsoleStatusListener.addNewInstanceToContext(): https://github.com/qos-ch/logback/blob/master/logback-classic/src/main/groovy/ch/qos/logback/classic/gaffer/GafferConfigurator.groovy#L65 Whereas the current OnConsoleStatusListener has no such method, since this change: https://github.com/qos-ch/logback/commit/43877e7aa1bba269488682c5925389d37a2102cd I tried reverting to logback 1.1.5 and the debug flag works fine in that release with groovy config files. Full stack trace is: {code} groovy.lang.MissingMethodException: No signature of method: static ch.qos.logback.core.status.OnConsoleStatusListener.addNewInstanceToContext() is applicable for argument types: (ch.qos.logback.classic.LoggerContext) values: [ch.qos.logback.classic.LoggerContext[default]] at groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1500) at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1486) at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:53) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at ch.qos.logback.classic.gaffer.GafferConfigurator.run(GafferConfigurator.groovy:65) at ch.qos.logback.classic.gaffer.GafferConfigurator$run.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166) at ch.qos.logback.classic.gaffer.GafferConfigurator.run(GafferConfigurator.groovy:44) at ch.qos.logback.classic.gaffer.GafferUtil.runGafferConfiguratorOn(GafferUtil.java:43) at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:67) at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150) at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84) at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:149) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:390) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:340) {code}

    QOS.ch JIRA | 10 months ago | Kornelis Sietsma
    groovy.lang.MissingMethodException: No signature of method: static ch.qos.logback.core.status.OnConsoleStatusListener.addNewInstanceToContext() is applicable for argument types: (ch.qos.logback.classic.LoggerContext) values: [ch.qos.logback.classic.LoggerContext[default]]
  3. 0

    Logback: how write logs to file

    Stack Overflow | 10 months ago | khris
    groovy.lang.MissingMethodException: No signature of method: static ch.qos.logback.core.status.OnConsoleStatusListener.addNewInstanceToContext() is applicable for argument types: (ch.qos.logback.classic.LoggerContext) values: [ch.qos.logback.classic.LoggerContext[default]]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 4#29130299

    GitHub | 3 years ago | florent-blanvillain
    groovy.lang.MissingMethodException: No signature of method: static java.lang.Math.max() is applicable for argument types: (java.lang.Integer, null) values: [4, null] Possible solutions: max(int, int), max(double, double), max(float, float), max(long, long), min(int, int), wait()
  6. 0

    GitHub comment 26#86188238

    GitHub | 2 years ago | echohack
    groovy.lang.MissingMethodException: No signature of method: com.sun.proxy.$Proxy30.invokeInTransaction() is applicable for argument types: (LocalBuildService$1) values: [LocalBuildService$1@78d344a8] Possible solutions: invokeInTransaction(java.lang.String, java.util.concurrent.Callable)
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. groovy.lang.MissingMethodException

    No signature of method: static ch.qos.logback.core.status.OnConsoleStatusListener.addNewInstanceToContext() is applicable for argument types: (ch.qos.logback.classic.LoggerContext) values: [ch.qos.logback.classic.LoggerContext[default]]

    at groovy.lang.MetaClassImpl.invokeStaticMissingMethod()
  2. Groovy
    AbstractCallSite.call
    1. groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1500)
    2. groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1486)
    3. org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:53)
    4. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    5. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
    6. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
    6 frames
  3. Logback Classic Module
    GafferConfigurator$run.callCurrent
    1. ch.qos.logback.classic.gaffer.GafferConfigurator.run(GafferConfigurator.groovy:65)
    2. ch.qos.logback.classic.gaffer.GafferConfigurator$run.callCurrent(Unknown Source)
    2 frames
  4. Groovy
    AbstractCallSite.callCurrent
    1. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
    2. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
    3. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
    3 frames
  5. Logback Classic Module
    ContextInitializer.autoConfig
    1. ch.qos.logback.classic.gaffer.GafferConfigurator.run(GafferConfigurator.groovy:44)
    2. ch.qos.logback.classic.gaffer.GafferUtil.runGafferConfiguratorOn(GafferUtil.java:43)
    3. ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:67)
    4. ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
    4 frames
  6. SLF4J LOG4J-12 Binding
    StaticLoggerBinder.<clinit>
    1. org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
    2. org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
    2 frames
  7. SLF4J API Module
    LoggerFactory.getLogger
    1. org.slf4j.LoggerFactory.bind(LoggerFactory.java:149)
    2. org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
    3. org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:390)
    4. org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:340)
    4 frames