In the demo app, I removed all the pre-installed catalogs and then products from the admin console, all actions were successful based on the ui feedbacks, but the products are still showing on the shop website, and the entries in blc_product table are not removed at all. In addition, after removing the products, removing product options "Shirt Color" and "Shirt Size" throws errors,
Code: Select all
Problem accessing /admin/product-options/1/delete. Reason:
Problem removing entity : org.hibernate.exception.ConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`broadleaf`.`blc_sku_option_value_xref`, CONSTRAINT `FK7B61DC0BB0C16A73` FOREIGN KEY (`PRODUCT_OPTION_VALUE_ID`) REFERENCES `blc_product_option_value` (`PRODUCT_OPTION_VALUE_ID`))
Caused by:
org.broadleafcommerce.common.exception.ServiceException: Problem removing entity : org.hibernate.exception.ConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`broadleaf`.`blc_sku_option_value_xref`, CONSTRAINT `FK7B61DC0BB0C16A73` FOREIGN KEY (`PRODUCT_OPTION_VALUE_ID`) REFERENCES `blc_product_option_value` (`PRODUCT_OPTION_VALUE_ID`))
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.broadleafcommerce.openadmin.server.service.DynamicEntityRemoteService.recreateSpecificServiceException(DynamicEntityRemoteService.java:76)
at org.broadleafcommerce.openadmin.server.service.DynamicEntityRemoteService.remove(DynamicEntityRemoteService.java:193)
at sun.reflect.GeneratedMethodAccessor238.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64)
Everything was done through the admin console, no manual database modifications.
I am on version 3.0-GA
Thanks.
Jay