[ 
https://issues.apache.org/jira/browse/OFBIZ-12607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17541578#comment-17541578
 ] 

Steven Payne commented on OFBIZ-12607:
--------------------------------------

Hi Nicolas,

 

That seems to have fixed the issue.  I can run the MRP now without it giving me 
that error. Thanks!!

> MRP Fails to Run
> ----------------
>
>                 Key: OFBIZ-12607
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12607
>             Project: OFBiz
>          Issue Type: Bug
>          Components: manufacturing
>    Affects Versions: 18.12.03, 18.12.05
>         Environment: Windows 10
> MySQL
>            Reporter: Steven Payne
>            Assignee: Nicolas Malin
>            Priority: Major
>              Labels: mrp
>         Attachments: Facility.xml, ProductFacility.xml, WorkEffort2.txt, 
> WorkEffortGoodStandard.xml, image-2022-04-27-08-01-32-251.png
>
>
> The MRP module fails to run.
>  
> It seems to be related to loading the WEGS_CREATED status items in the 
> WorkEffortGoodStandard table. When I load the database tables into the newest 
> version of OFBiz (18.12.05) I need to exclude certain lines from the table in 
> order to get the MRP to run.
>  
> See below screen shot: (image-2022-04-27-08-01-32-251.png)
> !image-2022-04-27-08-01-32-251.png!
> The error from the log is below:
> 2022-04-27 07:59:53,600 |OFBiz-JobQueue-26 |ServiceDispatcher |E| Error in 
> Service [createRequirementStatus]: Error doing entity-auto operation for 
> entity RequirementStatus in service createRequirementStatus: 
> org.apache.ofbiz.entity.GenericEntityException: 
> org.apache.ofbiz.entity.GenericEntityException: Error while inserting: 
> [GenericEntity:RequirementStatus][changeByUserLoginId,admin(java.lang.String)][createdStamp,2022-04-27
>  07:59:53.528(java.sql.Timestamp)][createdTxStamp,2022-04-27 
> 07:59:53.527(java.sql.Timestamp)][lastUpdatedStamp,2022-04-27 
> 07:59:53.528(java.sql.Timestamp)][lastUpdatedTxStamp,2022-04-27 
> 07:59:53.527(java.sql.Timestamp)][requirementId,38541(java.lang.String)][statusDate,2022-04-27
>  07:59:53.528(java.sql.Timestamp)][statusId,REQ_PROPOSED(java.lang.String)] 
> (SQL Exception while executing the following:INSERT INTO REQUIREMENT_STATUS 
> (REQUIREMENT_ID, STATUS_ID, STATUS_DATE, CHANGE_BY_USER_LOGIN_ID, 
> LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) 
> VALUES (?, ?, ?, ?, ?, ?, ?, ?) (Cannot add or update a child row: a foreign 
> key constraint fails)) (Error while inserting: 
> [GenericEntity:RequirementStatus][changeByUserLoginId,admin(java.lang.String)][createdStamp,2022-04-27
>  07:59:53.528(java.sql.Timestamp)][createdTxStamp,2022-04-27 
> 07:59:53.527(java.sql.Timestamp)][lastUpdatedStamp,2022-04-27 
> 07:59:53.528(java.sql.Timestamp)][lastUpdatedTxStamp,2022-04-27 
> 07:59:53.527(java.sql.Timestamp)][requirementId,38541(java.lang.String)][statusDate,2022-04-27
>  07:59:53.528(java.sql.Timestamp)][statusId,REQ_PROPOSED(java.lang.String)] 
> (SQL Exception while executing the following:INSERT INTO REQUIREMENT_STATUS 
> (REQUIREMENT_ID, STATUS_ID, STATUS_DATE, CHANGE_BY_USER_LOGIN_ID, 
> LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) 
> VALUES (?, ?, ?, ?, ?, ?, ?, ?) (Cannot add or update a child row: a foreign 
> key constraint fails)))
> 2022-04-27 07:59:53,600 |OFBiz-JobQueue-26 |GenericServiceJob |E| 
> Async-Service failed.
> java.lang.Exception: Error during creation or update MrpEvent, parameters:
> {reInitialize=true, 
> userLogin=[GenericEntity:UserLogin][createdStamp,2019-07-17 
> 12:31:03.524(java.sql.Timestamp)][createdTxStamp,2019-07-17 
> 12:31:03.446(java.sql.Timestamp)][currentPassword,$SHA$ZOC.$A9uGqmZa8CQRqKoqEuVp1jT-Hbw(java.lang.String)][disabledDateTime,2022-04-18
>  
> 10:54:33.972(java.sql.Timestamp)][enabled,Y(java.lang.String)][hasLoggedOut,N(java.lang.String)][lastLocale,en_CA(java.lang.String)][lastTimeZone,America/Vancouver(java.lang.String)][lastUpdatedStamp,2022-04-27
>  07:56:44.265(java.sql.Timestamp)][lastUpdatedTxStamp,2022-04-27 
> 07:56:44.265(java.sql.Timestamp)][requirePasswordChange,N(java.lang.String)][successiveFailedLogins,0(java.lang.Long)][userLoginId,admin(java.lang.String)],
>  manufacturingFacilityId=ACS_Kamloops, mrpId=10408, facilityId=ACS_Kamloops, 
> defaultYearsOffset=1}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to