Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-3906

NPE when doing log:clear and log:display and log full=true

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.0
    • Fix Version/s: 4.0.1
    • Component/s: None
    • Labels:
      None

      Description

      When executing the below commands the NPE delow appears. The reason seems to be that the full flag is not reset to false when clear is called.
      So to reproduce make sure you create a lot of log entries first.

      karaf@trun()> log:clear
      karaf@trun()> log:display
      Error executing command: java.lang.NullPointerException
      karaf@trun()> log:tail
      2015-08-06 11:46:31,833 | ERROR | nsole user karaf | ShellUtil | 50 - org.apache.karaf.shell.core - 4.0.0 | Exception caught while executing command
      java.lang.NullPointerException
      at org.apache.karaf.log.command.DisplayLog.execute(DisplayLog.java:85)[44:org.apache.karaf.log.core:4.0.0]
      at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[50:org.apache.karaf.shell.core:4.0.0]
      at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[50:org.apache.karaf.shell.core:4.0.0]
      at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[50:org.apache.karaf.shell.core:4.0.0]
      at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[50:org.apache.karaf.shell.core:4.0.0]
      at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[50:org.apache.karaf.shell.core:4.0.0]
      at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[50:org.apache.karaf.shell.core:4.0.0]
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[50:org.apache.karaf.shell.core:4.0.0]
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[50:org.apache.karaf.shell.core:4.0.0]
      at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[50:org.apache.karaf.shell.core:4.0.0]
      at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:267)[50:org.apache.karaf.shell.core:4.0.0]
      at java.lang.Thread.run(Thread.java:745)[:1.7.0_60]

        Attachments

          Activity

            People

            • Assignee:
              chris@die-schneider.net Christian Schneider
              Reporter:
              chris@die-schneider.net Christian Schneider
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: