Uploaded image for project: 'PUBLIC - Liferay Commerce'
  1. PUBLIC - Liferay Commerce
  2. COMMERCE-4819

NPE in CommerceOrderItemIndexerTest.testEmptyQuery

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 7.3
    • Fix Version/s: 7.3
    • Component/s: None
    • Labels:

      Description

      CommerceOrderItemIndexerTest.testEmptyQuery is failing due to a NullPointerException:

          [exec] com.liferay.commerce.internal.search.test.CommerceOrderItemIndexerTest > testEmptyQuery STARTED
           [exec] 16:12:27,967 INFO  [com.liferay.commerce.test-executor-thread][CompanyIndexFactory:57] liferay-49924
           [exec] 16:12:53,054 ERROR [com.liferay.commerce.test-executor-thread][CommerceProductPriceCalculationV2Impl:550] There is no base price list configured for the current catalog
           [exec] 16:12:56,866 INFO  [com.liferay.commerce.test-executor-thread][CompanyIndexFactory:57] 
           [exec] 
           [exec] com.liferay.commerce.internal.search.test.CommerceOrderItemIndexerTest > testEmptyQuery FAILED
           [exec]     java.lang.NullPointerException
           [exec]     	at com.liferay.commerce.internal.price.BaseCommerceProductPriceCalculation.setCommerceProductPriceWithTaxAmount(BaseCommerceProductPriceCalculation.java:358)
           [exec]     	at com.liferay.commerce.internal.price.CommerceProductPriceCalculationV2Impl.getCommerceProductPrice(CommerceProductPriceCalculationV2Impl.java:261)
           [exec]     	at com.liferay.commerce.service.impl.CommerceOrderItemLocalServiceImpl._getCommerceProductPrice(CommerceOrderItemLocalServiceImpl.java:1188)
           [exec]     	at com.liferay.commerce.service.impl.CommerceOrderItemLocalServiceImpl._createCommerceOrderItem(CommerceOrderItemLocalServiceImpl.java:1085)
           [exec]     	at com.liferay.commerce.service.impl.CommerceOrderItemLocalServiceImpl.addCommerceOrderItem(CommerceOrderItemLocalServiceImpl.java:130)
           [exec]     	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           [exec]     	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           [exec]     	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [exec]     	at java.lang.reflect.Method.invoke(Method.java:498)
           [exec]     	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
           [exec]     	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
           [exec]     	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
           [exec]     	at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:60)
           [exec]     	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
           [exec]     	at com.liferay.portal.kernel.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:64)
           [exec]     	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
           [exec]     	at com.liferay.change.tracking.internal.aop.CTTransactionAdvice.invoke(CTTransactionAdvice.java:80)
           [exec]     	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
           [exec]     	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
           [exec]     	at com.sun.proxy.$Proxy1177.addCommerceOrderItem(Unknown Source)
           [exec]     	at com.liferay.commerce.service.CommerceOrderItemLocalServiceUtil.addCommerceOrderItem(CommerceOrderItemLocalServiceUtil.java:66)
           [exec]     	at com.liferay.commerce.test.util.CommerceTestUtil.addCommerceOrderItem(CommerceTestUtil.java:394)
           [exec]     	at com.liferay.commerce.test.util.CommerceTestUtil.addCommerceOrderItem(CommerceTestUtil.java:378)
           [exec]     	at com.liferay.commerce.internal.search.test.CommerceOrderItemIndexerTest._addCommerceOrderItems(CommerceOrderItemIndexerTest.java:134)
           [exec]     	at com.liferay.commerce.internal.search.test.CommerceOrderItemIndexerTest.testEmptyQuery(CommerceOrderItemIndexerTest.java:98)
           [exec]     	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           [exec]     	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           [exec]     	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [exec]     	at java.lang.reflect.Method.invoke(Method.java:498)
           [exec]     	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable$2.evaluate(TestExecutorRunnable.java:234)
           [exec]     	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
           [exec]     	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
           [exec]     	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
           [exec]     	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable$1.evaluate(TestExecutorRunnable.java:143)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
           [exec]     	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable._execute(TestExecutorRunnable.java:181)
           [exec]     	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable.run(TestExecutorRunnable.java:95)
           [exec]     	at java.lang.Thread.run(Thread.java:745)

      Reproduced on:
      Portal Master GIT ID: 2d2e8ae74e9e7b33a07328277da64f54db576a04

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alessandro.iovane Alessandro Iovane
              Reporter:
              brooke.dalton Brooke Dalton
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  7.3