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 | 7 months ago
  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 | 7 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 | 7 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 | 6 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

    RestApiErrors annotation return MissingMethodException

    GitHub | 3 years ago | thagul
    groovy.lang.MissingMethodException: No signature of method: static org.jsondoc.core.pojo.ApiErrorDoc.buildFromAnnotation() is applicable for argument types: (com.sun.proxy.$Proxy39) values: [@org.restapidoc.annotation.RestApiErrors(apierrors=[@org.restapidoc.annotation.RestApiError(description=The book was not found!, code=404)])] Possible solutions: buildFromAnnotation(org.jsondoc.core.annotation.ApiErrors)
  6. 0

    groovy.lang.MissingMethodException: No signature of method: java.util.LinkedHashMap.version() is applicable for argument types: ()

    GitHub | 4 years ago | codeconsole
    groovy.lang.MissingMethodException: No signature of method: java.util.LinkedHashMap.version() is applicable for argument types: () values: [] Possible solutions: size(), size(), iterator(), every()
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