Page 1 of 1

Exception when adding a SKU to inventory

Posted: Thu Jan 10, 2013 5:29 pm
by skystar3
I am getting this exception when adding a SKU to the inventory

Code: Select all

//EX[2,1,["org.broadleafcommerce.common.exception.ServiceException/1744595097","Problem adding new entity : org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update"],0,7]

Re: Exception when adding a SKU to inventory

Posted: Fri Jan 11, 2013 10:58 am
by phillipuniverse
Which page are you on and what specific actions are you performing to reproduce the error?

My immediate guess is that the values in SEQUENCE_GENERATOR are not populated correctly which is a documentation error. You can verify this by looking at the SEQUENCE_GENERATOR table and see what the ID_VAL column has for the ID_KEY of 'InventoryImpl'. This should always be higher than the highest value in the BLC_INVENTORY table.

Another verification would be to continually attempt to add inventory. It will continue to fail until the sequence has incremented above the highest value in the BLC_INVENTORY table and will eventually succeed.