ch.qos.logback.core.util.IncompatibleClassException

QOS.ch JIRA | Michael Osipov | 6 years ago
  1. 0

    According to the docs, the subject pattern equals to the pattern layout. Putting a %cn into it fails with an exception {noformat} <Subject>${HOSTNAME} %cn %level %X{ad.displayName} %logger{20} - %.20msg - %ex{-1}</Subject> {noformat} {noformat} 15:13:56,973 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.net.SMTPAppender] 15:13:57,045 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [EMAIL] 15:13:57,525 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@1a54421 - Failed to instantiate converter class [ch.qos.logback.classic.joran.action.ContextNameAction] ch.qos.logback.core.util.IncompatibleClassException at ch.qos.logback.core.util.IncompatibleClassException at at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:47) at at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:31) at at ch.qos.logback.core.pattern.parser.Compiler.createConverter(Compiler.java:101) at at ch.qos.logback.core.pattern.parser.Compiler.compile(Compiler.java:58) at at ch.qos.logback.core.pattern.parser.Parser.compile(Parser.java:66) at at ch.qos.logback.core.pattern.PatternLayoutBase.start(PatternLayoutBase.java:84) at at ch.qos.logback.classic.net.SMTPAppender.makeSubjectLayout(SMTPAppender.java:101) at at ch.qos.logback.core.net.SMTPAppenderBase.start(SMTPAppenderBase.java:155) at at ch.qos.logback.classic.net.SMTPAppender.start(SMTPAppender.java:60) at at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:96) at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:315) at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:194) at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:180) at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:52) at at ch.qos.logback.core.joran.spi.Interpreter.play(Interpreter.java:332) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:126) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:93) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:52) at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:77) at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150) at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85) at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121) at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111) at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:268) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:241) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:254) at at com.siemens.ad.ld.listener.DataSourceService.<clinit>(DataSourceService.java:37) at at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at at java.lang.Class.newInstance0(Class.java:359) at at java.lang.Class.newInstance(Class.java:312) at at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4079) at at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630) at at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3391) at at org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:943) at at org.apache.catalina.manager.HTMLManagerServlet.reload(HTMLManagerServlet.java:556) at at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:121) at at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563) at at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861) at at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) at at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584) at at java.lang.Thread.run(Thread.java:619) 15:13:57,525 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@1a54421 - [cn] is not a valid conversion word 15:13:57,532 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender] {noformat} %contextName does work. This is a bug

    QOS.ch JIRA | 6 years ago | Michael Osipov
    ch.qos.logback.core.util.IncompatibleClassException
  2. 0

    According to the docs, the subject pattern equals to the pattern layout. Putting a %cn into it fails with an exception {noformat} <Subject>${HOSTNAME} %cn %level %X{ad.displayName} %logger{20} - %.20msg - %ex{-1}</Subject> {noformat} {noformat} 15:13:56,973 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.net.SMTPAppender] 15:13:57,045 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [EMAIL] 15:13:57,525 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@1a54421 - Failed to instantiate converter class [ch.qos.logback.classic.joran.action.ContextNameAction] ch.qos.logback.core.util.IncompatibleClassException at ch.qos.logback.core.util.IncompatibleClassException at at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:47) at at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:31) at at ch.qos.logback.core.pattern.parser.Compiler.createConverter(Compiler.java:101) at at ch.qos.logback.core.pattern.parser.Compiler.compile(Compiler.java:58) at at ch.qos.logback.core.pattern.parser.Parser.compile(Parser.java:66) at at ch.qos.logback.core.pattern.PatternLayoutBase.start(PatternLayoutBase.java:84) at at ch.qos.logback.classic.net.SMTPAppender.makeSubjectLayout(SMTPAppender.java:101) at at ch.qos.logback.core.net.SMTPAppenderBase.start(SMTPAppenderBase.java:155) at at ch.qos.logback.classic.net.SMTPAppender.start(SMTPAppender.java:60) at at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:96) at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:315) at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:194) at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:180) at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:52) at at ch.qos.logback.core.joran.spi.Interpreter.play(Interpreter.java:332) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:126) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:93) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:52) at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:77) at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150) at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85) at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121) at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111) at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:268) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:241) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:254) at at com.siemens.ad.ld.listener.DataSourceService.<clinit>(DataSourceService.java:37) at at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at at java.lang.Class.newInstance0(Class.java:359) at at java.lang.Class.newInstance(Class.java:312) at at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4079) at at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630) at at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3391) at at org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:943) at at org.apache.catalina.manager.HTMLManagerServlet.reload(HTMLManagerServlet.java:556) at at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:121) at at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563) at at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861) at at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) at at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584) at at java.lang.Thread.run(Thread.java:619) 15:13:57,525 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@1a54421 - [cn] is not a valid conversion word 15:13:57,532 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender] {noformat} %contextName does work. This is a bug

    QOS.ch JIRA | 6 years ago | Michael Osipov
    ch.qos.logback.core.util.IncompatibleClassException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Custom logback appender throws

    Stack Overflow | 3 years ago | Matthias B
    ch.qos.logback.core.joran.spi.ActionException: ch.qos.logback.core.util.IncompatibleClassException

    Root Cause Analysis

    1. ch.qos.logback.core.util.IncompatibleClassException

      No message provided

      at ch.qos.logback.core.util.OptionHelper.instantiateByClassName()
    2. Logback Core Module
      PatternLayoutBase.start
      1. ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:47)
      2. ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:31)
      3. ch.qos.logback.core.pattern.parser.Compiler.createConverter(Compiler.java:101)
      4. ch.qos.logback.core.pattern.parser.Compiler.compile(Compiler.java:58)
      5. ch.qos.logback.core.pattern.parser.Parser.compile(Parser.java:66)
      6. ch.qos.logback.core.pattern.PatternLayoutBase.start(PatternLayoutBase.java:84)
      6 frames
    3. Logback Classic Module
      SMTPAppender.makeSubjectLayout
      1. ch.qos.logback.classic.net.SMTPAppender.makeSubjectLayout(SMTPAppender.java:101)
      1 frame
    4. Logback Core Module
      SMTPAppenderBase.start
      1. ch.qos.logback.core.net.SMTPAppenderBase.start(SMTPAppenderBase.java:155)
      1 frame
    5. Logback Classic Module
      SMTPAppender.start
      1. ch.qos.logback.classic.net.SMTPAppender.start(SMTPAppender.java:60)
      1 frame
    6. Logback Core Module
      GenericConfigurator.doConfigure
      1. ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:96)
      2. ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:315)
      3. ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:194)
      4. ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:180)
      5. ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:52)
      6. ch.qos.logback.core.joran.spi.Interpreter.play(Interpreter.java:332)
      7. ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:126)
      8. ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:93)
      9. ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:52)
      9 frames
    7. Logback Classic Module
      ContextInitializer.autoConfig
      1. ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:77)
      2. ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
      2 frames
    8. SLF4J LOG4J-12 Binding
      StaticLoggerBinder.<clinit>
      1. org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
      2. org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
      2 frames
    9. SLF4J API Module
      LoggerFactory.getLogger
      1. org.slf4j.LoggerFactory.bind(LoggerFactory.java:121)
      2. org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)
      3. org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:268)
      4. org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:241)
      5. org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:254)
      5 frames
    10. com.siemens.ad
      DataSourceService.<clinit>
      1. com.siemens.ad.ld.listener.DataSourceService.<clinit>(DataSourceService.java:37)
      1 frame
    11. Java RT
      Class.newInstance
      1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      4. java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      5. java.lang.Class.newInstance0(Class.java:359)
      6. java.lang.Class.newInstance(Class.java:312)
      6 frames
    12. Glassfish Core
      StandardContext.reload
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4079)
      2. org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
      3. org.apache.catalina.core.StandardContext.reload(StandardContext.java:3391)
      3 frames
    13. org.apache.catalina
      HTMLManagerServlet.doGet
      1. org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:943)
      2. org.apache.catalina.manager.HTMLManagerServlet.reload(HTMLManagerServlet.java:556)
      3. org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:121)
      3 frames
    14. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      2 frames
    15. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      8. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      9. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      9 frames
    16. Grizzly HTTP
      AprEndpoint$Worker.run
      1. org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861)
      2. org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
      3. org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584)
      3 frames
    17. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:619)
      1 frame