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

NullPointerException when adding a feature repository to a cluster

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • cellar-4.0.1
    • cellar
    • None

    Description

      I have a cluster with 2 nodes. Both nodes have the feature listener enabled (org.apache.karaf.cellar.node.cfg / feature.listener = true).
      On node 1, I install a custom feature repository with following command:

      feature:repo-add mvn:com.bechtle.terra/com.bechtle.terra.renderer.feature/LATEST/xml/features

      On node 2, I get a NullPointerException:

      2016-02-05 11:10:39,849 | ERROR | pool-50-thread-1 | RepositoryEventHandler           | 64 - org.apache.karaf.cellar.features - 4.0.0 | CELLAR FEATURE: failed to add/remove repository URL mvn:com.bechtle.terra/com.bechtle.terra.renderer.feature/LATEST/xml/features
      java.lang.NullPointerException
      	at org.apache.karaf.cellar.features.RepositoryEventHandler.handle(RepositoryEventHandler.java:80)[64:org.apache.karaf.cellar.features:4.0.0]
      	at org.apache.karaf.cellar.features.RepositoryEventHandler.handle(RepositoryEventHandler.java:29)[64:org.apache.karaf.cellar.features:4.0.0]
      	at org.apache.karaf.cellar.core.event.EventDispatchTask.run(EventDispatchTask.java:57)[63:org.apache.karaf.cellar.core:4.0.0]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)[:1.7.0_55]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)[:1.7.0_55]
      	at java.lang.Thread.run(Unknown Source)[:1.7.0_55]
      

      The same effect occurs when I use the dedicated cluster command:
      cluster:feature-repo-add default mvn:com.bechtle.terra/com.bechtle.terra.renderer.feature/LATEST/xml/features

      When I disable the feature listener (org.apache.karaf.cellar.node.cfg / feature.listener = false), the cluster-command
      cluster:feature-repo-add default mvn:com.bechtle.terra/com.bechtle.terra.renderer.feature/LATEST/xml/features
      works as exepected. The repository is then also available on node 2 and the feature can be installed.

      If I did something wrong, it would nevertheless be helpful if an error message would tell what caused the problem.

      Attachments

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            roland.hauser@bechtle.ch Roland Hauser
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: