I'm getting this error in my Magento install more and more often.
**Payment transaction failed.**
**Reason**
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '38754-0-1' for key 'PRIMARY'
**Checkout Type**
onepage
Im sorry but I haven't got more info to share. Any idea how to fix this?
Related
Every time I try to save the filled records the server responses in 500 in my laravel project. The following is screencast for the error. It is always just happened only in my local development but not at other dev's local. I have tried the following but it still happens.
refresh and seed DB again
clear cache
I`m new to Larvel Aimeos. I have used the following command to setup Aimeos.
composer create-project aimeos/aimeos myshop
But I`m stuck on the following issue while installing the same.
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-pr
oduct-custom-8' for key 'unq_msattr_sid_dom_cod_tid'
Any ideas on how to fix this?
There was a problem with the duplicate custom price attribute when installing the demo data. This has been fixed in a new Aimeos core release yesterday, so please try again
I think you are using this project https://github.com/aimeos/aimeos-laravel
So if you wanna to install the same project again you should create a new database to connect within your config/database.php file.
Or don't install the dummy data php artisan aimeos:setup --option=setup/default/demo:1 that the project required because it's already created.
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4-81' for key 'UNQ_CATALOG_PRODUCT_SUPER_ATTRIBUTE_PRODUCT_ID_ATTRIBUTE_ID', query was: INSERT INTO `catalog_product_super_attribute` (`product_id`, `attribute_id`) VALUES (?, ?)
Hi,
I'm getting the above error when trying to add a configurable product to my 1.9.2 CE installation. I have checked the database and this isn't actually a duplicate entry. I've tried resetting all the catalog product tables, including auto increments but the error persists.
I have also tried clearing all caches, reindexing and disabling all third party modules (although none of these should be affecting the product saving).
The only mention of this error I can find online is due to people writing custom product save code, but this is using the core functionality.
Does anybody know how I can fix this please?
Many thanks
I'm getting unhandled exception for specifying that a Duplicate Detection error (none of the duplicate detection rules are enabled in Dynamics CRM for Cases) has occurred.
The message says - 'Cannot insert duplicate key.'
Please help.
We are using BroadleafCommerce 3.1.0. Prior to this , We are using 3.0.13. Everything was working fine in 3.0.13. We did all the required changes as per the Migration Notes present in BLC WebSite. After doing all, we can able to compile the WorkSpace. Deployment also successfull. While invoking MyCompany,And Admin we are getting following error :
==============================================>MYCOMPANY
java.lang.NullPointerException
at org.broadleafcommerce.common.web.BroadleafRequestCustomerResolverImpl.setCustomer(BroadleafRequestCustomerResolverImpl.java:62)
at org.broadleafcommerce.profile.web.core.CustomerState.setCustomer(CustomerState.java:52)
at org.broadleafcommerce.profile.web.core.security.CustomerStateRequestProcessor.process(CustomerStateRequestProcessor.java:134)
at org.broadleafcommerce.profile.web.core.security.CustomerStateFilter.doFilter(CustomerStateFilter.java:55)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
.......
======================================>ADMIN
Error while inserting fetched product id:12357968
org.springframework.dao.DataIntegrityViolationException: Cannot add or update a child row: a foreign key constraint fails (`broadleaf`.`blc_product`, CONSTRAINT `FK5B95B7C96D386535` FOREIGN KEY (`DEFAULT_SKU_ID`) REFERENCES `blc_sku` (`SKU_ID`)); SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`broadleaf`.`blc_product`, CONSTRAINT `FK5B95B7C96D386535` FOREIGN KEY (`DEFAULT_SKU_ID`) REFERENCES `blc_sku` (`SKU_ID`))
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:643)
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:105)
at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:517)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:755)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:270)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy161.saveSku(Unknown Source)
Caused by: org.hibernate.exception.ConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`broadleaf`.`blc_product`, CONSTRAINT `FK5B95B7C96D386535` FOREIGN KEY (`DEFAULT_SKU_ID`) REFERENCES `blc_sku` (`SKU_ID`))
at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:74)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:129)
at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
at com.sun.proxy.$Proxy447.executeUpdate(Unknown Source)
at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:56)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3028)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3469)
at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:88)
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:275)
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:326)
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52)
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1213)
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:402)
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175)
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:75)
at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:513)
... 109 more
For the admin issue, drop the constraint from the blc_product table for default_sku_id. I verified that in 3.1, this constraint is no longer created as part of the install.
For the site issue, double check your web.xml and applicationContext.xml against a new 3.1 demo install to see if you can spot any differences. If you can recreate with a clean 3.1 demo install then open an issue in GitHub. Otherwise, you might try adding breakpoints in your code and in similar spots in a clean 3.1 demo install to see if you can determine the difference.
Edit: The site issue is being tracked separately here: Getting error while Giving Request to MyCompany in Broadleaf Commerce
Brian,
Disclaimer : I work at Broadleaf Commerce