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

NullPointerException when running obr:info on a bundle served by cave

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.4
    • Fix Version/s: 4.1.2, 4.0.10, 4.2.0.M1
    • Component/s: cave, karaf
    • Labels:
      None

      Description

      Hello,

      I am using Cave 4.0.0 with Karaf 4.0.4-SNAPSHOT (after having the same problem with 4.0.3) and I get a NullPointerException when running the obr:info command on a bundle.

      To reproduce:

      __ __ ____
      / ///___ __________ _/ __/
      / ,< / __ `/ __/ __ `/ /
      / /| |/ // / / / // / __/
      // ||_,// _,//

      Apache Karaf (4.0.4-SNAPSHOT)

      Hit '<tab>' for a list of available commands
      and '[cmd] --help' for help on a specific command.
      Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.

      karaf@root()> feature:repo-add cave 4.0.0
      Adding feature url mvn:org.apache.karaf.cave/apache-karaf-cave/4.0.0/xml/features
      karaf@root()> feature:install cave-server
      karaf@root()> cave:repository-create my-repository
      karaf@root()> cave:repository-upload my-repository mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.ant/1.7.0_5
      karaf@root()> feature:install obr
      karaf@root()> obr:url-add http://localhost:8181/cave/http/my-repository-repository.xml
      karaf@root()> obr:list
      Name | Symbolic Name | Version
      --------------------------------------------------

      org.apache.servicemix.bundles.ant 1.7.0.5

      karaf@root()> obr:info org.apache.servicemix.bundles.ant
      Error executing command: java.lang.NullPointerException

      karaf@root()> display -n 3

      2015-12-05 18:40:26,319 | INFO | pool-50-thread-1 | bundle | 56 - org.apache.aries.spifly.dynamic.bundle - 1.0.1 | No 'SPI-Provider' Manifest header. Skipping bundle: org.apache.karaf.obr.core
      2015-12-05 18:40:26,319 | INFO | pool-50-thread-1 | FeaturesServiceImpl | 9 - org.apache.karaf.features.core - 4.0.4.SNAPSHOT | Done.
      2015-12-05 18:40:40,518 | ERROR | nsole user karaf | ShellUtil | 44 - org.apache.karaf.shell.core - 4.0.4.SNAPSHOT | Exception caught while executing command
      java.lang.NullPointerException
      at org.apache.karaf.obr.command.InfoCommand.printResource(InfoCommand.java:65)[118:org.apache.karaf.obr.core:4.0.4.SNAPSHOT]
      at org.apache.karaf.obr.command.InfoCommand.doExecute(InfoCommand.java:57)[118:org.apache.karaf.obr.core:4.0.4.SNAPSHOT]
      at org.apache.karaf.obr.command.ObrCommandSupport.execute(ObrCommandSupport.java:58)[118:org.apache.karaf.obr.core:4.0.4.SNAPSHOT]
      at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[44:org.apache.karaf.shell.core:4.0.4.SNAPSHOT]
      at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[44:org.apache.karaf.shell.core:4.0.4.SNAPSHOT]
      at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[44:org.apache.karaf.shell.core:4.0.4.SNAPSHOT]
      at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[44:org.apache.karaf.shell.core:4.0.4.SNAPSHOT]
      at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[44:org.apache.karaf.shell.core:4.0.4.SNAPSHOT]
      at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[44:org.apache.karaf.shell.core:4.0.4.SNAPSHOT]
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[44:org.apache.karaf.shell.core:4.0.4.SNAPSHOT]
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[44:org.apache.karaf.shell.core:4.0.4.SNAPSHOT]
      at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[44:org.apache.karaf.shell.core:4.0.4.SNAPSHOT]
      at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:270)[44:org.apache.karaf.shell.core:4.0.4.SNAPSHOT]
      at java.lang.Thread.run(Thread.java:745)[:1.8.0_60]

      karaf@root()>

      Regards

        Attachments

          Activity

            People

            • Assignee:
              jbonofre Jean-Baptiste Onofré
              Reporter:
              maprohu Marton Papp
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: