java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Failed to instantiate [ch.qos.logback.classic.LoggerContext] Reported exception: java.lang.NullPointerException at ch.qos.logback.core.subst.Parser.T(Parser.java:75) at ch.qos.logback.core.subst.Parser.E(Parser.java:50) at ch.qos.logback.core.subst.Parser.parse(Parser.java:46) at ch.qos.logback.core.subst.NodeToStringTransformer.tokenizeAndParseString(NodeToStringTransformer.java:55) at ch.qos.logback.core.subst.NodeToStringTransformer.handleVariable(NodeToStringTransformer.java:96) at ch.qos.logback.core.subst.NodeToStringTransformer.compileNode(NodeToStringTransformer.java:72) at ch.qos.logback.core.subst.NodeToStringTransformer.transform(NodeToStringTransformer.java:60) at ch.qos.logback.core.subst.NodeToStringTransformer.substituteVariable(NodeToStringTransformer.java:48) at ch.qos.logback.core.util.OptionHelper.substVars(OptionHelper.java:117) at ch.qos.logback.core.joran.spi.InterpretationContext.subst(InterpretationContext.java:159) at ch.qos.logback.core.joran.action.NestedBasicPropertyIA.body(NestedBasicPropertyIA.java:87) at ch.qos.logback.core.joran.spi.Interpreter.callBodyAction(Interpreter.java:295) at ch.qos.logback.core.joran.spi.Interpreter.characters(Interpreter.java:175) at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:57) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:149) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:135) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49) at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75) at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150) at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85) at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
    via by VENKATESWARA RAO PATELLA,
  • Failed to instantiate [ch.qos.logback.classic.LoggerContext] Reported exception: java.lang.NullPointerException at ch.qos.logback.core.subst.Parser.T(Parser.java:75) at ch.qos.logback.core.subst.Parser.E(Parser.java:50) at ch.qos.logback.core.subst.Parser.parse(Parser.java:46) at ch.qos.logback.core.subst.NodeToStringTransformer.tokenizeAndParseString(NodeToStringTransformer.java:55) at ch.qos.logback.core.subst.NodeToStringTransformer.handleVariable(NodeToStringTransformer.java:96) at ch.qos.logback.core.subst.NodeToStringTransformer.compileNode(NodeToStringTransformer.java:72) at ch.qos.logback.core.subst.NodeToStringTransformer.transform(NodeToStringTransformer.java:60) at ch.qos.logback.core.subst.NodeToStringTransformer.substituteVariable(NodeToStringTransformer.java:48) at ch.qos.logback.core.util.OptionHelper.substVars(OptionHelper.java:117) at ch.qos.logback.core.joran.spi.InterpretationContext.subst(InterpretationContext.java:159) at ch.qos.logback.core.joran.action.NestedBasicPropertyIA.body(NestedBasicPropertyIA.java:87) at ch.qos.logback.core.joran.spi.Interpreter.callBodyAction(Interpreter.java:295) at ch.qos.logback.core.joran.spi.Interpreter.characters(Interpreter.java:175) at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:57) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:149) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:135) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49) at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75) at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150) at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85) at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
    via by VENKATESWARA RAO PATELLA,
  • An empty string literal passed to property substitution will generate an NPE. The problem seems to lie in the changes that were made to the ch.qos.logback.core.subst.NodeToStringTransformer class. Tokenize returns a null Token in this case, which then fails at line 75 of the ch.qos.logback.core.subst.Parser class, where the switch tries to access the type filed on Token. I have attached a small test case which you can unzip and run. The stack trace below should appear on stderr. Unexpected error, server was not started: this is probably a bug. java.lang.NullPointerException at ch.qos.logback.core.subst.Parser.T(Parser.java:75) at ch.qos.logback.core.subst.Parser.E(Parser.java:50) at ch.qos.logback.core.subst.Parser.parse(Parser.java:46) at ch.qos.logback.core.subst.NodeToStringTransformer.tokenizeAndParseString(NodeToStringTransformer.java:55) at ch.qos.logback.core.subst.NodeToStringTransformer.handleVariable(NodeToStringTransformer.java:96) at ch.qos.logback.core.subst.NodeToStringTransformer.compileNode(NodeToStringTransformer.java:72) at ch.qos.logback.core.subst.NodeToStringTransformer.transform(NodeToStringTransformer.java:60) at ch.qos.logback.core.subst.NodeToStringTransformer.substituteVariable(NodeToStringTransformer.java:48) at ch.qos.logback.core.util.OptionHelper.substVars(OptionHelper.java:117) at ch.qos.logback.core.joran.spi.InterpretationContext.subst(InterpretationContext.java:159) at ch.qos.logback.core.joran.action.NestedBasicPropertyIA.body(NestedBasicPropertyIA.java:87) at ch.qos.logback.core.joran.spi.Interpreter.callBodyAction(Interpreter.java:295) at ch.qos.logback.core.joran.spi.Interpreter.characters(Interpreter.java:175) at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:57) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:149) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:135) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:76) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:68) at LogbackTokenizerTest.main(LogbackTokenizerTest.java:17)
    via by Albert Louis Rossi,
  • An empty string literal passed to property substitution will generate an NPE. The problem seems to lie in the changes that were made to the ch.qos.logback.core.subst.NodeToStringTransformer class. Tokenize returns a null Token in this case, which then fails at line 75 of the ch.qos.logback.core.subst.Parser class, where the switch tries to access the type filed on Token. I have attached a small test case which you can unzip and run. The stack trace below should appear on stderr. Unexpected error, server was not started: this is probably a bug. java.lang.NullPointerException at ch.qos.logback.core.subst.Parser.T(Parser.java:75) at ch.qos.logback.core.subst.Parser.E(Parser.java:50) at ch.qos.logback.core.subst.Parser.parse(Parser.java:46) at ch.qos.logback.core.subst.NodeToStringTransformer.tokenizeAndParseString(NodeToStringTransformer.java:55) at ch.qos.logback.core.subst.NodeToStringTransformer.handleVariable(NodeToStringTransformer.java:96) at ch.qos.logback.core.subst.NodeToStringTransformer.compileNode(NodeToStringTransformer.java:72) at ch.qos.logback.core.subst.NodeToStringTransformer.transform(NodeToStringTransformer.java:60) at ch.qos.logback.core.subst.NodeToStringTransformer.substituteVariable(NodeToStringTransformer.java:48) at ch.qos.logback.core.util.OptionHelper.substVars(OptionHelper.java:117) at ch.qos.logback.core.joran.spi.InterpretationContext.subst(InterpretationContext.java:159) at ch.qos.logback.core.joran.action.NestedBasicPropertyIA.body(NestedBasicPropertyIA.java:87) at ch.qos.logback.core.joran.spi.Interpreter.callBodyAction(Interpreter.java:295) at ch.qos.logback.core.joran.spi.Interpreter.characters(Interpreter.java:175) at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:57) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:149) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:135) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:76) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:68) at LogbackTokenizerTest.main(LogbackTokenizerTest.java:17)
    via by Albert Louis Rossi,
    • java.lang.NullPointerException at ch.qos.logback.core.subst.Parser.T(Parser.java:75) at ch.qos.logback.core.subst.Parser.E(Parser.java:50) at ch.qos.logback.core.subst.Parser.parse(Parser.java:46) at ch.qos.logback.core.subst.NodeToStringTransformer.tokenizeAndParseString(NodeToStringTransformer.java:55) at ch.qos.logback.core.subst.NodeToStringTransformer.handleVariable(NodeToStringTransformer.java:96) at ch.qos.logback.core.subst.NodeToStringTransformer.compileNode(NodeToStringTransformer.java:72) at ch.qos.logback.core.subst.NodeToStringTransformer.transform(NodeToStringTransformer.java:60) at ch.qos.logback.core.subst.NodeToStringTransformer.substituteVariable(NodeToStringTransformer.java:48) at ch.qos.logback.core.util.OptionHelper.substVars(OptionHelper.java:117) at ch.qos.logback.core.joran.spi.InterpretationContext.subst(InterpretationContext.java:159) at ch.qos.logback.core.joran.action.NestedBasicPropertyIA.body(NestedBasicPropertyIA.java:87) at ch.qos.logback.core.joran.spi.Interpreter.callBodyAction(Interpreter.java:295) at ch.qos.logback.core.joran.spi.Interpreter.characters(Interpreter.java:175) at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:57) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:149) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:135) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49) at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75) at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150) at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85) at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)

    Users with the same issue

    Unknown visitor1 times, last one,