Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-7554

fabric:join fails with NullPointerException if default version 1.0 does not exist anymore

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • fuse-6.x-GA
    • jboss-fuse-6.3
    • Fabric8 v1
    • Medium
    • % %
    • Hide

      fabric:join --version X.Y

      Show
      fabric:join --version X.Y
    • Hide

      Steps to reproduce:

      fabric:create ...
      fabric:version-create 1.1
      fabric:container-upgrade 1.1
      fabric:version-set-default 1.1
      fabric:version-delete 1.0
      

      Then on the second Fuse instance:
      fabric:join ...

      Show
      Steps to reproduce: fabric:create ... fabric:version-create 1.1 fabric:container-upgrade 1.1 fabric:version-set- default 1.1 fabric:version-delete 1.0 Then on the second Fuse instance: fabric:join ...

      Running fabric:join fails with NullPointerException if the default version 1.0 does not exist anymore.

      2018-01-02 14:35:30,838 | WARN  | admin-1-thread-1 | FabricConfigAdminBridge          | 173 - io.fabric8.fabric-configadmin - 1.2.0.redhat-630310 | No profile data yet so cannot update!
      2018-01-02 14:35:30,841 | WARN  | store-2-thread-1 | ZkDataStoreImpl                  | 170 - io.fabric8.fabric-core - 1.2.0.redhat-630310 | Caught: java.lang.NullPointerException
      java.lang.NullPointerException
              at io.fabric8.internal.ContainerImpl.getContainerProfile(ContainerImpl.java:764)[170:io.fabric8.fabric-core:1.2.0.redhat-630310]
              at io.fabric8.internal.ContainerImpl.getOverlayProfile(ContainerImpl.java:306)[170:io.fabric8.fabric-core:1.2.0.redhat-630310]
              at io.fabric8.features.FabricFeaturesServiceImpl.listInstalledRepositories(FabricFeaturesServiceImpl.java:396)[178:io.fabric8.fabric-features-service:1.2.0.redhat-630310]
              at io.fabric8.features.FabricFeaturesServiceImpl.run(FabricFeaturesServiceImpl.java:116)[178:io.fabric8.fabric-features-service:1.2.0.redhat-630310]
              at io.fabric8.service.ZkDataStoreImpl.doRunCallbacks(ZkDataStoreImpl.java:259)[170:io.fabric8.fabric-core:1.2.0.redhat-630310]
              at io.fabric8.service.ZkDataStoreImpl.access$100(ZkDataStoreImpl.java:103)[170:io.fabric8.fabric-core:1.2.0.redhat-630310]
              at io.fabric8.service.ZkDataStoreImpl$1.run(ZkDataStoreImpl.java:247)[170:io.fabric8.fabric-core:1.2.0.redhat-630310]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_151]
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_151]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_151]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_151]
              at java.lang.Thread.run(Thread.java:748)[:1.8.0_151]
      2018-01-02 14:35:30,846 | WARN  | admin-1-thread-1 | FabricConfigAdminBridge          | 173 - io.fabric8.fabric-configadmin - 1.2.0.redhat-630310 | No profile data yet so cannot update!
      

      While a fabric:join --version X.Y works correctly, there should perhaps be a better error handling.
      fabric:container-list does not list the new container, so the join definitely failed.
      On the other hand its not possible to re-run fabric:join --version X.Y on this failed container as it only returns This container is already connected to a fabric. The only option left seems to throw away the container and its installation. There should be a better error handling.

              ggrzybek Grzegorz Grzybek
              rhn-support-tmielke Torsten Mielke
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: