Broadleaf Commerce 3.1.0 is Giving Error - spring

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

Related

Laravel aimeos - Integrity constraint violation issue

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.

Magento integrity constraint violation: 1062 on creating configurable product

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

Entity Framework ORA-04098: Trigger Error

I have a trigger which updates the entries of another table while inserting one table. It is basically copy some of data to another table. I compiled is on toad and it worked successfully but when i try to insert a new values to table by using my web application entity framework throws an exception :
SQL Error: ORA-04098: trigger 'ExampleTrigger' is invalid and failed re-validation;
What should i do? I disabled the trigger and also droped it, tried again nothing is changed. Same error in related trigger.

broadleaf commerce initial setup db and static asset

I referred
http://docs.broadleafcommerce.org/core/current/getting-started
to get started with broadleaf commerce. While everything is good with installation, when i run the application as mentioned i get 2 errors. They are as below:
Database creation error: This error comes while starting jetty server.
SchemaExport - HHH000389: Unsuccessful: alter table
BLC_TRANS_ADDITNL_FIELDS drop constraint FK376DDE4B9E955B1D
SchemaExport - user lacks privilege or object not found:
PUBLIC.BLC_TRANS_ADDITNL_FIELDS
Static resoure mapping error: This error comes while i load any page which has image on it. Below are the details.
StaticAssetViewController - Unable to retrieve static asset Failed to
delete original file
'C:\user\AppData\Local\Temp\30\95\Hoppin-Hot-Sauce-Bottle---d41d8cd98f00b204e9800998ecf8427e.jpg'
after copy to
'C:\user\AppData\Local\Temp\img\sauces\Hoppin-Hot-Sauce-Bottle---d41d8cd98f00b204e9800998ecf8427e.jpg'
Note: StaticAssetView issue was resolved in BLC 3.2.
The database error shouldn't be an issue. When the app starts it first tries to clean the DB by dropping everything. If the tables or constraints don't exist you get this error and that is fine, later on in the start up sequence it will create all these DB objects.

( ! ) Fatal error: Uncaught exception 'Exception Occured while migrating joomla 1.5 to 2.5

I'm trying to migrate my joomla website from 1.5.26 to 2.5. While migrating the joomla website through jupgrade extension, it is showing me "Migrating undefined". So, i've on the migration error in jupgrade extension then it shows me the following error which are related to the j25_users table.
Please have alook at the following error:-
( ! ) Fatal error: Uncaught exception 'Exception' with message 'Unknown column 'subscribe' in 'field list' SQL=INSERT INTO `j25_users` (`id`,`name`,`username`,`email`,`password`,`usertype`,`block`,`sendEmail`,`registerDate`,`lastvisitDate`,`activation`,`params`,`subscribe`) VALUES ('62','ChhathPoojaAdmin','admin','info#vivid-techno.com','36b6db909a7471b4e6fdf31b4eec641e:UELuOKlpIjy0jqPf36I8Kzj8uNElGBf9','Super Administrator','0','1','2010-06-27 16:18:02','2013-01-21 12:36:40','','{\"admin_language\":\"en-GB\",\"language\":\"en-GB\",\"editor\":\"xstandard\",\"helpsite\":\"\",\"timezone\":\"UTC\"}','1')' in C:\wamp\www\jdchhath\administrator\components\com_jupgrade\includes\jupgrade.class.php on line 347
Any Guess, how to solve it?
Upgrading your old joomla website to latest joomla version can be hectic as it could make you to feel so angry. The answer of my solution was that the subscribe column was not in the latest joomla version that makes it problem to upgrade my website to latest version. So i inserted myself the column table "subscribe" in my #__users table and please note that don't delete the old database tables which has been created by the jupgrde even if it is unsuccessful.That's it and you are done. If you are encounting any other problems related to database then first of all make sure that columns or tables are exist or not in your database. If jupgrade extensions creates any new database other than these tables jupgrade_categories,jupgrade_menus,jupgrade_modules,jupgrade_steps than don't delete it from my opinion.Just add the new columns or table in the newly created tables by jupgrade

Resources