After Assign Product Into Category Getting Error Unique constraint violation found
In exception.log
file :-
[2019-05-31 17:53:29] main.CRITICAL: Unique constraint violation found {"exception":"[object] (Magento\Framework\Exception\AlreadyExistsException(code: 0): Unique constraint violation found at /var/www/html/m2shineretrofits/vendor/magento/framework/EntityManager/Operation/Update.php:121, Magento\Framework\DB\Adapter\DuplicateException(code: 1062): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'root-category/sub-category/product-url' for key 'URL_REWRITE_REQUEST_PATH_STORE_ID', query was: INSERT INTO
url_rewrite
(redirect_type
,is_autogenerated
,metadata
,description
,entity_type
,entity_id
,request_path
,target_path
,store_id
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?),
Also Try This Solution But Not Working :-
Add categories automatically - Unique constraint violation found
Magento 2 Unique Constraint Violation Found On Product Save
Magento 2 : Unique constraint violation found when adding product, categories or mega menu items