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

Deleting products that are used in an open order make Minium break

    Details

      Description

      Steps to Reproduce

      1. Create a minium site
      2. Create an order with a product
      3. Delete that product from the Products page in the Admin control panel
      4. Try to access again Minium with that order as the current order

      Expected Behavior

      Can see the open order, but the product is no longer in the order.

      Actual Behavior

      The site crashes.

      The following is a partial stacktrace:

      20-03-12 14:37:35.452 ERROR [http-nio-8080-exec-2][IncludeTag:128] Current URL /group/minium generates exception: com.liferay.commerce.product.exception.NoSuchCPInstanceException: No CPInstance exists with the primary key 3949720-03-12 14:37:35.452 ERROR [http-nio-8080-exec-2][IncludeTag:128] Current URL /group/minium generates exception: com.liferay.commerce.product.exception.NoSuchCPInstanceException: No CPInstance exists with the primary key 39497com.liferay.commerce.product.exception.NoSuchCPInstanceException: No CPInstance exists with the primary key 39497 at com.liferay.commerce.product.service.persistence.impl.CPInstancePersistenceImpl.findByPrimaryKey(CPInstancePersistenceImpl.java:7302) at com.liferay.commerce.product.service.persistence.impl.CPInstancePersistenceImpl.findByPrimaryKey(CPInstancePersistenceImpl.java:7320) at com.liferay.commerce.product.service.base.CPInstanceLocalServiceBaseImpl.getCPInstance(CPInstanceLocalServiceBaseImpl.java:300) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153) at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:203) at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:94) at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130) at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130) at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:125) at com.liferay.commerce.product.service.CPInstanceLocalServiceUtil.getCPInstance(CPInstanceLocalServiceUtil.java:607) at com.liferay.commerce.model.impl.CommerceOrderItemImpl.getCPInstance(CommerceOrderItemImpl.java:60) at com.liferay.commerce.internal.order.VersionCommerceOrderValidatorImpl.validate(VersionCommerceOrderValidatorImpl.java:73) at com.liferay.commerce.internal.order.CommerceOrderHttpHelperImpl._validateCommerceOrderItemVersions(CommerceOrderHttpHelperImpl.java:510) at com.liferay.commerce.internal.order.CommerceOrderHttpHelperImpl._getCurrentCommerceOrder(CommerceOrderHttpHelperImpl.java:405) at com.liferay.commerce.internal.order.CommerceOrderHttpHelperImpl.getCurrentCommerceOrder(CommerceOrderHttpHelperImpl.java:227) at com.liferay.commerce.internal.context.CommerceContextHttpImpl.getCommerceOrder(CommerceContextHttpImpl.java:164) at com.liferay.commerce.theme.minium.internal.product.renderer.list.entry.MiniumCPContentListEntryRenderer.render(MiniumCPContentListEntryRenderer.java:191) at org.apache.jsp.product_005flist_005fentry_005frenderer.page_jsp._jspService(page_jsp.java:121)2020-03-12 14:37:35.455 ERROR [http-nio-8080-exec-2][IncludeTag:128] Current URL /group/minium generates exception: com.liferay.commerce.product.exception.NoSuchCPInstanceException: No CPInstance exists with the primary key 39497com.liferay.commerce.product.exception.NoSuchCPInstanceException: No CPInstance exists with the primary key 39497 at com.liferay.commerce.product.service.persistence.impl.CPInstancePersistenceImpl.findByPrimaryKey(CPInstancePersistenceImpl.java:7302) at com.liferay.commerce.product.service.persistence.impl.CPInstancePersistenceImpl.findByPrimaryKey(CPInstancePersistenceImpl.java:7320) at com.liferay.commerce.product.service.base.CPInstanceLocalServiceBaseImpl.getCPInstance(CPInstanceLocalServiceBaseImpl.java:300) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153) at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:203) at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:94) at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130) at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130) at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:125) at com.liferay.commerce.product.service.CPInstanceLocalServiceUtil.getCPInstance(CPInstanceLocalServiceUtil.java:607) at com.liferay.commerce.model.impl.CommerceOrderItemImpl.getCPInstance(CommerceOrderItemImpl.java:60) at com.liferay.commerce.internal.order.VersionCommerceOrderValidatorImpl.validate(VersionCommerceOrderValidatorImpl.java:73) at com.liferay.commerce.internal.order.CommerceOrderHttpHelperImpl._validateCommerceOrderItemVersions(CommerceOrderHttpHelperImpl.java:510) at com.liferay.commerce.internal.order.CommerceOrderHttpHelperImpl._getCurrentCommerceOrder(CommerceOrderHttpHelperImpl.java:405) at com.liferay.commerce.internal.order.CommerceOrderHttpHelperImpl.getCurrentCommerceOrder(CommerceOrderHttpHelperImpl.java:227) at com.liferay.commerce.internal.context.CommerceContextHttpImpl.getCommerceOrder(CommerceContextHttpImpl.java:164) at com.liferay.commerce.theme.minium.internal.product.renderer.list.entry.MiniumCPContentListEntryRenderer.render(MiniumCPContentListEntryRenderer.java:191) at org.apache.jsp.product_005flist_005fentry_005frenderer.page_jsp._jspService(page_jsp.java:121)2020-03-12 14:37:35.460 ERROR [http-nio-8080-exec-2][IncludeTag:128] Current URL /group/minium generates exception: com.liferay.commerce.product.exception.NoSuchCPInstanceException: No CPInstance exists with the primary key 39497com.liferay.commerce.product.exception.NoSuchCPInstanceException: No CPInstance exists with the primary key 39497 at com.liferay.commerce.product.service.persistence.impl.CPInstancePersistenceImpl.findByPrimaryKey(CPInstancePersistenceImpl.java:7302) at com.liferay.commerce.product.service.persistence.impl.CPInstancePersistenceImpl.findByPrimaryKey(CPInstancePersistenceImpl.java:7320) at com.liferay.commerce.product.service.base.CPInstanceLocalServiceBaseImpl.getCPInstance(CPInstanceLocalServiceBaseImpl.java:300) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153) at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:203) at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:94) at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130) at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130) at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:125) at com.liferay.commerce.product.service.CPInstanceLocalServiceUtil.getCPInstance(CPInstanceLocalServiceUtil.java:607) at com.liferay.commerce.model.impl.CommerceOrderItemImpl.getCPInstance(CommerceOrderItemImpl.java:60) at com.liferay.commerce.internal.order.VersionCommerceOrderValidatorImpl.validate(VersionCommerceOrderValidatorImpl.java:73) at com.liferay.commerce.internal.order.CommerceOrderHttpHelperImpl._validateCommerceOrderItemVersions(CommerceOrderHttpHelperImpl.java:510) at com.liferay.commerce.internal.order.CommerceOrderHttpHelperImpl._getCurrentCommerceOrder(CommerceOrderHttpHelperImpl.java:405) at com.liferay.commerce.internal.order.CommerceOrderHttpHelperImpl.getCurrentCommerceOrder(CommerceOrderHttpHelperImpl.java:227) at com.liferay.commerce.internal.context.CommerceContextHttpImpl.getCommerceOrder(CommerceContextHttpImpl.java:164) at com.liferay.commerce.theme.minium.internal.product.renderer.list.entry.MiniumCPContentListEntryRenderer.render(MiniumCPContentListEntryRenderer.java:191) at org.apache.jsp.product_005flist_005fentry_005frenderer.page_jsp._jspService(page_jsp.java:121)2020-03-12 14:37:35.561 ERROR [http-nio-8080-exec-2][AccountSelectorTag:122] com.liferay.commerce.product.exception.NoSuchCPInstanceException: No CPInstance exists with the primary key 39497com.liferay.commerce.product.exception.NoSuchCPInstanceException: No CPInstance exists with the primary key 39497 at com.liferay.commerce.product.service.persistence.impl.CPInstancePersistenceImpl.findByPrimaryKey(CPInstancePersistenceImpl.java:7302) at com.liferay.commerce.product.service.persistence.impl.CPInstancePersistenceImpl.findByPrimaryKey(CPInstancePersistenceImpl.java:7320) at com.liferay.commerce.product.service.base.CPInstanceLocalServiceBaseImpl.getCPInstance(CPInstanceLocalServiceBaseImpl.java:300) at sun.reflect.GeneratedMethodAccessor630.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153) at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:203) at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:94) at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130) at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130) at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:125) at com.sun.proxy.$Proxy814.getCPInstance(Unknown Source) at com.liferay.commerce.product.service.CPInstanceLocalServiceUtil.getCPInstance(CPInstanceLocalServiceUtil.java:607) at com.liferay.commerce.model.impl.CommerceOrderItemImpl.getCPInstance(CommerceOrderItemImpl.java:60) at com.liferay.commerce.internal.order.VersionCommerceOrderValidatorImpl.validate(VersionCommerceOrderValidatorImpl.java:73) at com.liferay.commerce.internal.order.CommerceOrderHttpHelperImpl._validateCommerceOrderItemVersions(CommerceOrderHttpHelperImpl.java:510) at com.liferay.commerce.internal.order.CommerceOrderHttpHelperImpl._getCurrentCommerceOrder(CommerceOrderHttpHelperImpl.java:405) at com.liferay.commerce.internal.order.CommerceOrderHttpHelperImpl.getCurrentCommerceOrder(CommerceOrderHttpHelperImpl.java:227) at com.liferay.commerce.internal.context.CommerceContextHttpImpl.getCommerceOrder(CommerceContextHttpImpl.java:164)
      

       

        Attachments

          Activity

            People

            Assignee:
            lorenzo.lapescara Lorenzo La Pescara
            Reporter:
            andrea.sbarra Andrea Sbarra
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package
                2.1.0