blc.version 3.0.5-GA
steps to reproduce
1) create a new product and save it
2) add media from media tab with key "Primary" and save it
3) now add "Primary Image" from General Tab.
it will throw Duplicate entry '759368-primary' for key 'PRIMARY' exceptions
[ WARN] 15:35:20 SqlExceptionHelper - SQL Error: 1062, SQLState: 23000
[ERROR] 15:35:20 SqlExceptionHelper - Duplicate entry '759368-primary' for key 'PRIMARY'
[ERROR] 15:35:20 DynamicEntityRemoteService - Problem updating org.broadleafcommerce.core.catalog.domain.Product
org.broadleafcommerce.common.exception.ServiceException: Unable to update entity for org.broadleafcommerce.core.catalog.domain.ProductImpl
at org.broadleafcommerce.admin.server.service.handler.ProductCustomPersistenceHandler.update(ProductCustomPersistenceHandler.java:135)
at org.broadleafcommerce.openadmin.server.service.persistence.PersistenceManagerImpl.update(PersistenceManagerImpl.java:380)
at org.broadleafcommerce.openadmin.server.service.DynamicEntityRemoteService.update(DynamicEntityRemoteService.java:170)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
This forum is in readonly mode and serves as an archive of old information. All posting, registration and commenting abilities have been turned off. To get help, the Broadleaf team reguarly monitors the broadleaf-commerce tag on Stack Overflow so please ask your questions there.