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

Karaf Shell Null Pointer Exception when Running a command

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 4.1.6, 4.2.1
    • None
    • None
    • None

    Description

      When running a command directly from the cli using bin/shell, this triggers a null pointer exception.

      I.e, in a terminal, run the following:

      {install_dir}/bin/shell echo hello
      

      You will receive this stacktrace:

      Exception in thread "main" java.lang.NullPointerException: "in" is null!
      	at java.nio.channels.Channels.checkNotNull(Channels.java:67)
      	at java.nio.channels.Channels.newChannel(Channels.java:347)
      	at org.apache.felix.gogo.runtime.CommandSessionImpl.<init>(CommandSessionImpl.java:109)
      	at org.apache.felix.gogo.runtime.CommandProcessorImpl.createSession(CommandProcessorImpl.java:84)
      	at org.apache.felix.gogo.runtime.CommandProcessorImpl.createSession(CommandProcessorImpl.java:40)
      	at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.<init>(ConsoleSessionImpl.java:157)
      	at org.apache.karaf.shell.impl.console.SessionFactoryImpl.create(SessionFactoryImpl.java:159)
      	at org.apache.karaf.shell.impl.console.standalone.Main.createSession(Main.java:175)
      	at org.apache.karaf.shell.impl.console.standalone.Main.run(Main.java:138)
      	at org.apache.karaf.shell.impl.console.standalone.Main.run(Main.java:131)
      	at org.apache.karaf.shell.impl.console.standalone.Main.run(Main.java:74)
      	at org.apache.karaf.shell.impl.console.standalone.Main.main(Main.java:56)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cetra3 Cetra Free
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: