java.lang.NullPointerException

QOS.ch JIRA | Paulius Matulionis | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Having this logback configuration: {code} <?xml version="1.0" encoding="UTF-8"?> <configuration debug="true" scan="true" scanPeriod="60 minutes"> <appender name="LOGOUTPUT" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${catalina.base}/logs/gateway_api.log</file> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> </encoder> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <FileNamePattern>logFile.%d{yyyy-MM-dd}.log</FileNamePattern> </rollingPolicy> </appender> <appender name="STDOUTPUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> </encoder> </appender> <logger name="com.groupgti" level="DEBUG"/> <logger name="org.springframework" level="INFO"/> <logger name="org.apache.cxf" level="INFO"/> <root level="WARN"> <appender-ref ref="LOGOUTPUT"/> </root> </configuration> {code} And these dependencies in classpath: {code} <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.10</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.7.10</version> <scope>compile</scope> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.1.2</version> <scope>compile</scope> </dependency> {code} Getting a lot of these exceptions in log files. {code} 08:55:58,884 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Elapsed period: Wed Feb 25 08:55:45 GMT 2015 08:55:58,889 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/usr/share/apache-tomcat-8.0.18/logs/saml.log] to [logFile.2015-02-25.log] 08:55:58,891 |-WARN in c.q.l.co.rolling.helper.RenameUtil - Failed to rename file [/usr/share/apache-tomcat-8.0.18/logs/saml.log] as [logFile.2015-02-25.log]. 08:55:58,892 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[LOGOUTPUT] - Appender [LOGOUTPUT] failed to append. java.lang.NullPointerException at java.lang.NullPointerException at at ch.qos.logback.core.rolling.helper.FileStoreUtil.areOnSameFileStore(FileStoreUtil.java:44) at at ch.qos.logback.core.rolling.helper.RenameUtil.areOnDifferentVolumes(RenameUtil.java:97) at at ch.qos.logback.core.rolling.helper.RenameUtil.rename(RenameUtil.java:67) at at ch.qos.logback.core.rolling.TimeBasedRollingPolicy.rollover(TimeBasedRollingPolicy.java:153) at at ch.qos.logback.core.rolling.RollingFileAppender.attemptRollover(RollingFileAppender.java:158) at at ch.qos.logback.core.rolling.RollingFileAppender.rollover(RollingFileAppender.java:137) at at ch.qos.logback.core.rolling.RollingFileAppender.subAppend(RollingFileAppender.java:178) at at ch.qos.logback.core.OutputStreamAppender.append(OutputStreamAppender.java:103) at at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:88) at at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:48) at at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:273) at at ch.qos.logback.classic.Logger.callAppenders(Logger.java:260) at at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:442) at at ch.qos.logback.classic.Logger.filterAndLog_1(Logger.java:414) at at ch.qos.logback.classic.Logger.debug(Logger.java:507) at at com.groupgti.saml.handler.AssertionHandler.purgeRecords(AssertionHandler.java:95) at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at at java.lang.reflect.Method.invoke(Method.java:483) at at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65) at at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) at at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at at java.lang.Thread.run(Thread.java:745) 08:55:58,944 |-ERROR in c.q.l.c.recovery.ResilientFileOutputStream@1011140840 - IO failure while writing to file [/usr/share/apache-tomcat-8.0.18/logs/saml.log] java.io.IOException: Stream Closed at java.io.IOException: Stream Closed at at java.io.FileOutputStream.writeBytes(Native Method) at at java.io.FileOutputStream.write(FileOutputStream.java:315) at at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) at at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) at at ch.qos.logback.core.recovery.ResilientOutputStreamBase.flush(ResilientOutputStreamBase.java:79) at at ch.qos.logback.core.encoder.LayoutWrappingEncoder.doEncode(LayoutWrappingEncoder.java:137) at at ch.qos.logback.core.OutputStreamAppender.writeOut(OutputStreamAppender.java:194) at at ch.qos.logback.core.FileAppender.writeOut(FileAppender.java:209) at at ch.qos.logback.core.OutputStreamAppender.subAppend(OutputStreamAppender.java:219) at at ch.qos.logback.core.rolling.RollingFileAppender.subAppend(RollingFileAppender.java:182) at at ch.qos.logback.core.OutputStreamAppender.append(OutputStreamAppender.java:103) at at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:88) at at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:48) at at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:273) at at ch.qos.logback.classic.Logger.callAppenders(Logger.java:260) at at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:442) at at ch.qos.logback.classic.Logger.filterAndLog_1(Logger.java:414) at at ch.qos.logback.classic.Logger.error(Logger.java:547) at at com.groupgti.saml.handler.AssertionHandler.purgeRecords(AssertionHandler.java:103) at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at at java.lang.reflect.Method.invoke(Method.java:483) at at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65) at at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) at at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at at java.lang.Thread.run(Thread.java:745) 10:07:37,098 |-INFO in c.q.l.c.recovery.ResilientFileOutputStream@1011140840 - Attempting to recover from IO failure on file [/usr/share/apache-tomcat-8.0.18/logs/saml.log] 10:07:37,099 |-INFO in c.q.l.c.recovery.ResilientFileOutputStream@1011140840 - Recovered from IO failure on file [/usr/share/apache-tomcat-8.0.18/logs/saml.log] 08:55:58,946 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Elapsed period: Thu Feb 26 08:55:58 GMT 2015 08:55:58,947 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/usr/share/apache-tomcat-8.0.18/logs/saml.log] to [logFile.2015-02-26.log] 08:55:58,947 |-WARN in c.q.l.co.rolling.helper.RenameUtil - Failed to rename file [/usr/share/apache-tomcat-8.0.18/logs/saml.log] as [logFile.2015-02-26.log]. 08:55:58,947 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[LOGOUTPUT] - Appender [LOGOUTPUT] failed to append. java.lang.NullPointerException {code} I have been adviced to raise a bug. Reference in a mailing list: http://logback.10977.n7.nabble.com/java-lang-NullPointerException-from-RollingFileAppender-td14082.html#a14087

    QOS.ch JIRA | 2 years ago | Paulius Matulionis
    java.lang.NullPointerException
  2. 0

    Having this logback configuration: {code} <?xml version="1.0" encoding="UTF-8"?> <configuration debug="true" scan="true" scanPeriod="60 minutes"> <appender name="LOGOUTPUT" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${catalina.base}/logs/gateway_api.log</file> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> </encoder> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <FileNamePattern>logFile.%d{yyyy-MM-dd}.log</FileNamePattern> </rollingPolicy> </appender> <appender name="STDOUTPUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> </encoder> </appender> <logger name="com.groupgti" level="DEBUG"/> <logger name="org.springframework" level="INFO"/> <logger name="org.apache.cxf" level="INFO"/> <root level="WARN"> <appender-ref ref="LOGOUTPUT"/> </root> </configuration> {code} And these dependencies in classpath: {code} <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.10</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.7.10</version> <scope>compile</scope> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.1.2</version> <scope>compile</scope> </dependency> {code} Getting a lot of these exceptions in log files. {code} 08:55:58,884 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Elapsed period: Wed Feb 25 08:55:45 GMT 2015 08:55:58,889 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/usr/share/apache-tomcat-8.0.18/logs/saml.log] to [logFile.2015-02-25.log] 08:55:58,891 |-WARN in c.q.l.co.rolling.helper.RenameUtil - Failed to rename file [/usr/share/apache-tomcat-8.0.18/logs/saml.log] as [logFile.2015-02-25.log]. 08:55:58,892 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[LOGOUTPUT] - Appender [LOGOUTPUT] failed to append. java.lang.NullPointerException at java.lang.NullPointerException at at ch.qos.logback.core.rolling.helper.FileStoreUtil.areOnSameFileStore(FileStoreUtil.java:44) at at ch.qos.logback.core.rolling.helper.RenameUtil.areOnDifferentVolumes(RenameUtil.java:97) at at ch.qos.logback.core.rolling.helper.RenameUtil.rename(RenameUtil.java:67) at at ch.qos.logback.core.rolling.TimeBasedRollingPolicy.rollover(TimeBasedRollingPolicy.java:153) at at ch.qos.logback.core.rolling.RollingFileAppender.attemptRollover(RollingFileAppender.java:158) at at ch.qos.logback.core.rolling.RollingFileAppender.rollover(RollingFileAppender.java:137) at at ch.qos.logback.core.rolling.RollingFileAppender.subAppend(RollingFileAppender.java:178) at at ch.qos.logback.core.OutputStreamAppender.append(OutputStreamAppender.java:103) at at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:88) at at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:48) at at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:273) at at ch.qos.logback.classic.Logger.callAppenders(Logger.java:260) at at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:442) at at ch.qos.logback.classic.Logger.filterAndLog_1(Logger.java:414) at at ch.qos.logback.classic.Logger.debug(Logger.java:507) at at com.groupgti.saml.handler.AssertionHandler.purgeRecords(AssertionHandler.java:95) at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at at java.lang.reflect.Method.invoke(Method.java:483) at at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65) at at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) at at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at at java.lang.Thread.run(Thread.java:745) 08:55:58,944 |-ERROR in c.q.l.c.recovery.ResilientFileOutputStream@1011140840 - IO failure while writing to file [/usr/share/apache-tomcat-8.0.18/logs/saml.log] java.io.IOException: Stream Closed at java.io.IOException: Stream Closed at at java.io.FileOutputStream.writeBytes(Native Method) at at java.io.FileOutputStream.write(FileOutputStream.java:315) at at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) at at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) at at ch.qos.logback.core.recovery.ResilientOutputStreamBase.flush(ResilientOutputStreamBase.java:79) at at ch.qos.logback.core.encoder.LayoutWrappingEncoder.doEncode(LayoutWrappingEncoder.java:137) at at ch.qos.logback.core.OutputStreamAppender.writeOut(OutputStreamAppender.java:194) at at ch.qos.logback.core.FileAppender.writeOut(FileAppender.java:209) at at ch.qos.logback.core.OutputStreamAppender.subAppend(OutputStreamAppender.java:219) at at ch.qos.logback.core.rolling.RollingFileAppender.subAppend(RollingFileAppender.java:182) at at ch.qos.logback.core.OutputStreamAppender.append(OutputStreamAppender.java:103) at at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:88) at at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:48) at at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:273) at at ch.qos.logback.classic.Logger.callAppenders(Logger.java:260) at at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:442) at at ch.qos.logback.classic.Logger.filterAndLog_1(Logger.java:414) at at ch.qos.logback.classic.Logger.error(Logger.java:547) at at com.groupgti.saml.handler.AssertionHandler.purgeRecords(AssertionHandler.java:103) at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at at java.lang.reflect.Method.invoke(Method.java:483) at at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65) at at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) at at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at at java.lang.Thread.run(Thread.java:745) 10:07:37,098 |-INFO in c.q.l.c.recovery.ResilientFileOutputStream@1011140840 - Attempting to recover from IO failure on file [/usr/share/apache-tomcat-8.0.18/logs/saml.log] 10:07:37,099 |-INFO in c.q.l.c.recovery.ResilientFileOutputStream@1011140840 - Recovered from IO failure on file [/usr/share/apache-tomcat-8.0.18/logs/saml.log] 08:55:58,946 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Elapsed period: Thu Feb 26 08:55:58 GMT 2015 08:55:58,947 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/usr/share/apache-tomcat-8.0.18/logs/saml.log] to [logFile.2015-02-26.log] 08:55:58,947 |-WARN in c.q.l.co.rolling.helper.RenameUtil - Failed to rename file [/usr/share/apache-tomcat-8.0.18/logs/saml.log] as [logFile.2015-02-26.log]. 08:55:58,947 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[LOGOUTPUT] - Appender [LOGOUTPUT] failed to append. java.lang.NullPointerException {code} I have been adviced to raise a bug. Reference in a mailing list: http://logback.10977.n7.nabble.com/java-lang-NullPointerException-from-RollingFileAppender-td14082.html#a14087

    QOS.ch JIRA | 2 years ago | Paulius Matulionis
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    In case the evaluator could not be set for c.q.l.c.filter.EvaluatorFilter, it should NOT barf with a NPE. LOGBACK: No context given for ch.qos.logback.core.util.PropertySetter@176c74b |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Ignoring debug attribute. |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender] |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT] |-ERROR in ch.qos.logback.core.filter.EvaluatorFilter@e5855a - No evaluator set for filter myFilter |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [STDOUT] from the object stack |-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT to Logger[root] Exception in thread "main" java.lang.NullPointerException at ch.qos.logback.core.filter.EvaluatorFilter.decide(EvaluatorFilter.java:34) at ch.qos.logback.core.spi.FilterAttachableImpl.getFilterChainDecision(FilterAttachableImpl.java:68) at ch.qos.logback.core.AppenderBase.getFilterChainDecision(AppenderBase.java:115) at ch.qos.logback.core.AppenderBase.doAppend(AppenderBase.java:65) at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:51) at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:286) at ch.qos.logback.classic.Logger.callAppenders(Logger.java:270) at ch.qos.logback.classic.Logger.filterAndLog(Logger.java:375) at ch.qos.logback.classic.Logger.debug(Logger.java:398) at chapter5.GoMDC.main(GoMDC.java:28) Config file: <configuration> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> <param name="Pattern" value="%-4relative [%thread] %-5level %X{testKey} - %msg%n" /> </layout> <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> <Name>myFilter</Name> <Evaluator class="ch.qos.logback.classic.boolex.JaninoEventEvaluator"> <Expression>"k".equals(mdc.get("k"))</Expression> </Evaluator> </filter> </appender> public class EvaluatorFilter <root> <level value="debug" /> <appender-ref ref="STDOUT" /> </root> </configuration>

    QOS.ch JIRA | 1 decade ago | Ceki
    java.lang.NullPointerException
  5. 0

    In case the evaluator could not be set for c.q.l.c.filter.EvaluatorFilter, it should NOT barf with a NPE. LOGBACK: No context given for ch.qos.logback.core.util.PropertySetter@176c74b |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Ignoring debug attribute. |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender] |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT] |-ERROR in ch.qos.logback.core.filter.EvaluatorFilter@e5855a - No evaluator set for filter myFilter |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [STDOUT] from the object stack |-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT to Logger[root] Exception in thread "main" java.lang.NullPointerException at ch.qos.logback.core.filter.EvaluatorFilter.decide(EvaluatorFilter.java:34) at ch.qos.logback.core.spi.FilterAttachableImpl.getFilterChainDecision(FilterAttachableImpl.java:68) at ch.qos.logback.core.AppenderBase.getFilterChainDecision(AppenderBase.java:115) at ch.qos.logback.core.AppenderBase.doAppend(AppenderBase.java:65) at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:51) at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:286) at ch.qos.logback.classic.Logger.callAppenders(Logger.java:270) at ch.qos.logback.classic.Logger.filterAndLog(Logger.java:375) at ch.qos.logback.classic.Logger.debug(Logger.java:398) at chapter5.GoMDC.main(GoMDC.java:28) Config file: <configuration> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> <param name="Pattern" value="%-4relative [%thread] %-5level %X{testKey} - %msg%n" /> </layout> <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> <Name>myFilter</Name> <Evaluator class="ch.qos.logback.classic.boolex.JaninoEventEvaluator"> <Expression>"k".equals(mdc.get("k"))</Expression> </Evaluator> </filter> </appender> public class EvaluatorFilter <root> <level value="debug" /> <appender-ref ref="STDOUT" /> </root> </configuration>

    QOS.ch JIRA | 1 decade ago | Ceki
    java.lang.NullPointerException

    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. java.lang.NullPointerException

      No message provided

      at ch.qos.logback.core.rolling.helper.FileStoreUtil.areOnSameFileStore()
    2. Logback Core Module
      AppenderAttachableImpl.appendLoopOnAppenders
      1. ch.qos.logback.core.rolling.helper.FileStoreUtil.areOnSameFileStore(FileStoreUtil.java:44)
      2. ch.qos.logback.core.rolling.helper.RenameUtil.areOnDifferentVolumes(RenameUtil.java:97)
      3. ch.qos.logback.core.rolling.helper.RenameUtil.rename(RenameUtil.java:67)
      4. ch.qos.logback.core.rolling.TimeBasedRollingPolicy.rollover(TimeBasedRollingPolicy.java:153)
      5. ch.qos.logback.core.rolling.RollingFileAppender.attemptRollover(RollingFileAppender.java:158)
      6. ch.qos.logback.core.rolling.RollingFileAppender.rollover(RollingFileAppender.java:137)
      7. ch.qos.logback.core.rolling.RollingFileAppender.subAppend(RollingFileAppender.java:178)
      8. ch.qos.logback.core.OutputStreamAppender.append(OutputStreamAppender.java:103)
      9. ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:88)
      10. ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:48)
      10 frames
    3. Logback Classic Module
      Logger.debug
      1. ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:273)
      2. ch.qos.logback.classic.Logger.callAppenders(Logger.java:260)
      3. ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:442)
      4. ch.qos.logback.classic.Logger.filterAndLog_1(Logger.java:414)
      5. ch.qos.logback.classic.Logger.debug(Logger.java:507)
      5 frames
    4. com.groupgti.saml
      AssertionHandler.purgeRecords
      1. com.groupgti.saml.handler.AssertionHandler.purgeRecords(AssertionHandler.java:95)
      1 frame
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:483)
      4 frames
    6. Spring Context
      DelegatingErrorHandlingRunnable.run
      1. org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
      2. org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
      2 frames
    7. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      2. java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
      3. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
      4. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
      5. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      6. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      7. java.lang.Thread.run(Thread.java:745)
      7 frames