Uploaded image for project: 'E-commerce'
  1. E-commerce
  2. ECOMMERCE-106

NPE thrown while testing connection for commerceTools with dummy credentials

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Neutral
    • 1.0
    • None
    • None
    • None

    Description

      Testing connection reveals a NPE in the backend regarding commerceTools connection.

      Steps to reproduce:

      1) Go to ecommerce app
      2) Try to add a connection with credentials randomly, I've used url url url for all and selected commerceTools with option disabled

      AC

      • Fix for both Magento and commercetools 
      • Fix it for blank, empty, Null credentials
      • Fix it for dummy credentials 

      Here is the stacktrace:

      Caused by: java.lang.NullPointerException
      at info.magnolia.ecommerce.provider.commercetool.util.SphereClientUtil.get(SphereClientUtil.java:34) ~[magnolia-ecommerce-commerce-tool-connector-1.0-SNAPSHOT.jar:?]
      at info.magnolia.ecommerce.provider.commercetool.service.categories.All.fetch(All.java:50) ~[magnolia-ecommerce-commerce-tool-connector-1.0-SNAPSHOT.jar:?]
      at info.magnolia.ecommerce.cache.EcommerceCache$AllCategories.lambda$fetch$0(EcommerceCache.java:77) ~[magnolia-ecommerce-api-1.0-SNAPSHOT.jar:?]
      at com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$14(BoundedLocalCache.java:2039) ~[caffeine-2.6.2.jar:?]
      at java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1853) ~[?:1.8.0_171]
      at com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2037) ~[caffeine-2.6.2.jar:?]
      at com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2020) ~[caffeine-2.6.2.jar:?]
      at com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:112) ~[caffeine-2.6.2.jar:?]
      at com.github.benmanes.caffeine.cache.LocalManualCache.get(LocalManualCache.java:54) ~[caffeine-2.6.2.jar:?]
      at info.magnolia.ecommerce.cache.EcommerceCache$AllCategories.fetch(EcommerceCache.java:77) ~[magnolia-ecommerce-api-1.0-SNAPSHOT.jar:?]
      at info.magnolia.ecommerce.ui.apps.ecommerce.configuration.ui.dialog.action.TestConnectionDialogAction.testConnection(TestConnectionDialogAction.java:84) ~[magnolia-ecommerce-ui-1.0-SNAPSHOT.jar:?]
      at info.magnolia.ecommerce.ui.apps.ecommerce.configuration.ui.dialog.action.TestConnectionDialogAction.lambda$execute$1(TestConnectionDialogAction.java:77) ~[magnolia-ecommerce-ui-1.0-SNAPSHOT.jar:?]
      at java.util.Optional.ifPresent(Optional.java:159) ~[?:1.8.0_171]
      at info.magnolia.ecommerce.ui.apps.ecommerce.configuration.ui.dialog.action.TestConnectionDialogAction.execute(TestConnectionDialogAction.java:77) ~[magnolia-ecommerce-ui-1.0-SNAPSHOT.jar:?]
      at info.magnolia.ui.api.action.AbstractActionExecutor.execute(AbstractActionExecutor.java:62) ~[magnolia-ui-api-6.0.jar:?]
      ... 134 more

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                efochr Evzen Fochr
                ilgun Ilgun Ilgun
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD