Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-1238

NPE when invoking "scr list" with no components registered

    XMLWordPrintableJSON

Details

    Description

      The bug can be reproduced with a minimal Felix+SCR container like:

      [ 0] [Active ] [ 0] System Bundle (1.8.0)
      [ 1] [Active ] [ 1] Apache Felix Shell Service (1.2.0)
      [ 2] [Active ] [ 1] Apache Felix Shell TUI (1.2.0)
      [ 3] [Active ] [ 1] Apache Felix Bundle Repository (1.4.0)
      [ 7] [Active ] [ 1] Apache Felix Declarative Services (1.0.9.SNAPSHOT)

      In these condition, typing "scr list" in the shell causes a NPE:
      -> scr list
      No components registered
      Id State Name
      Unable to execute command: java.lang.NullPointerException
      java.lang.NullPointerException
      at org.apache.felix.scr.impl.ScrCommand.list(ScrCommand.java:161)
      at org.apache.felix.scr.impl.ScrCommand.execute(ScrCommand.java:102)
      at org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:291)
      at org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:177)
      at java.lang.Thread.run(Thread.java:637)

      The same happens trying to list components of a non-DS bundle
      -> svn list 3
      Bundle 3 declares no components
      Id State Name
      Unable to execute command: java.lang.NullPointerException
      java.lang.NullPointerException
      at org.apache.felix.scr.impl.ScrCommand.list(ScrCommand.java:161)
      at org.apache.felix.scr.impl.ScrCommand.execute(ScrCommand.java:102)
      at org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:291)
      at org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:177)
      at java.lang.Thread.run(Thread.java:637)

      Attachments

        1. FELIX-1238.txt
          0.7 kB
          Filippo Diotalevi

        Issue Links

          Activity

            People

              fmeschbe Felix Meschberger
              fdiotalevi Filippo Diotalevi
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: