Hi Steven,
it seems that you did not provide the whole stacktrace, at least I
cannot find a message containing hints for a failed foreign key constraint.
You should find the name of the failed constraint in the error log, near
the prepared statement log entry.
Please make your credentials shown in the log unreadable next time ;-)
Best regards,
Michael Brohl
ecomify GmbH - www.ecomify.de
Am 01.02.22 um 21:02 schrieb Steven Payne:
Hi All,
I am trying to run the MRP system here and I am coming across a weird error.
Has anyone else had issues with running MRP and it not being able to create a
REQUIREMENT_STATUS?
I managed to find the start of the error (posted below) and I am trying one by
one to add each manufacturing run to see if I can isolate the issue. No luck
so far. It states that there is a foreign key constraint breaking...but what FK
constraint?
2022-02-01 11:59:21,676 |OFBiz-JobQueue-47 |ServiceDispatcher
|E| Service [createRequirementStatus] threw an unexpected exception/error
org.apache.ofbiz.service.GenericServiceException: Cannot run job. (Unable to
queue job [createRequirementStatus.1643745561676])
at
org.apache.ofbiz.service.engine.GenericAsyncEngine.runAsync(GenericAsyncEngine.java:143)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.engine.GenericAsyncEngine.runAsync(GenericAsyncEngine.java:70)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runAsync(ServiceDispatcher.java:748)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runAsync(ServiceDispatcher.java:813)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runAsync(GenericDispatcherFactory.java:181)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.eca.ServiceEcaAction.runAction(ServiceEcaAction.java:131)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.eca.ServiceEcaRule.eval(ServiceEcaRule.java:160)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.eca.ServiceEcaUtil.evalRules(ServiceEcaUtil.java:191)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:514)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
[ofbiz.jar:?]
at
org.apache.ofbiz.manufacturing.mrp.ProposedOrder.create(ProposedOrder.java:262)
[ofbiz.jar:?]
at
org.apache.ofbiz.manufacturing.mrp.MrpServices.executeMrp(MrpServices.java:816)
[ofbiz.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[?:1.8.0_312]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:1.8.0_312]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_312]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_312]
at
org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:100)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:415)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:70)
[ofbiz.jar:?]
at org.apache.ofbiz.service.job.AbstractJob.run(AbstractJob.java:87)
[ofbiz.jar:?]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[?:1.8.0_312]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[?:1.8.0_312]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
Caused by: org.apache.ofbiz.service.job.InvalidJobException: Unable to queue
job [createRequirementStatus.1643745561676]
at
org.apache.ofbiz.service.job.GenericServiceJob.deQueue(GenericServiceJob.java:151)
~[ofbiz.jar:?]
at org.apache.ofbiz.service.job.JobPoller.queueNow(JobPoller.java:173)
~[ofbiz.jar:?]
at org.apache.ofbiz.service.job.JobManager.runJob(JobManager.java:366)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.engine.GenericAsyncEngine.runAsync(GenericAsyncEngine.java:141)
~[ofbiz.jar:?]
... 26 more
2022-02-01 11:59:21,677 |OFBiz-JobQueue-47 |TransactionUtil
|W| Calling transaction setRollbackOnly; this stack trace shows where this is
happening:
java.lang.Exception: Service [createRequirementStatus] threw an unexpected
exception/error
at
org.apache.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:358)
[ofbiz.jar:?]
at
org.apache.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:292)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runAsync(ServiceDispatcher.java:764)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runAsync(ServiceDispatcher.java:813)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runAsync(GenericDispatcherFactory.java:181)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.eca.ServiceEcaAction.runAction(ServiceEcaAction.java:131)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.eca.ServiceEcaRule.eval(ServiceEcaRule.java:160)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.eca.ServiceEcaUtil.evalRules(ServiceEcaUtil.java:191)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:514)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
[ofbiz.jar:?]
at
org.apache.ofbiz.manufacturing.mrp.ProposedOrder.create(ProposedOrder.java:262)
[ofbiz.jar:?]
at
org.apache.ofbiz.manufacturing.mrp.MrpServices.executeMrp(MrpServices.java:816)
[ofbiz.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[?:1.8.0_312]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:1.8.0_312]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_312]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_312]
at
org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:100)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:415)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:70)
[ofbiz.jar:?]
at org.apache.ofbiz.service.job.AbstractJob.run(AbstractJob.java:87)
[ofbiz.jar:?]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[?:1.8.0_312]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[?:1.8.0_312]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
2022-02-01 11:59:21,678 |OFBiz-JobQueue-47 |ServiceDispatcher
|T| [[Sync service failed...- total:0.0,since last(Begin):0.0]] - 'default /
createRequirement'
2022-02-01 11:59:21,678 |OFBiz-JobQueue-47 |TransactionUtil
|I| Transaction rollback only not set, rollback only is already set.
2022-02-01 11:59:21,678 |OFBiz-JobQueue-47 |ProposedOrder
|E| Error : createRequirement with parameters =
{userLogin=[GenericEntity:UserLogin][createdStamp,2021-12-20
09:32:20.339(java.sql.Timestamp)][createdTxStamp,2021-12-20
09:32:19.726(java.sql.Timestamp)][currentPassword,$SHA$3dODGJRbK1N$qvpr2vdLN8EgITdcHu4x951M2i8(java.lang.String)][disabledDateTime,2022-01-11
07:55:21.005(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-02-01
10:07:24.345(java.sql.Timestamp)][lastUpdatedTxStamp,2022-02-01
10:07:24.345(java.sql.Timestamp)][partyId,10000(java.lang.String)][passwordHint,Cat(java.lang.String)][requirePasswordChange,N(java.lang.String)][successiveFailedLogins,0(java.lang.Long)][userLoginId,spayne(java.lang.String)],
requirementTypeId=PRODUCT_REQUIREMENT, facilityId=ACS_Kamloops,
quantity=7.000000, productId=FSR1509, statusId=REQ_PROPOSED,
requiredByDate=2022-02-01 11:36:45.002, description=Automatically generated by
MRP, requirementStartDate=2022-02-01 11:36:45.002}--Cannot run job. (Unable to
queue job [createRequirementStatus.1643745561676])
org.apache.ofbiz.service.GenericServiceException: Cannot run job. (Unable to
queue job [createRequirementStatus.1643745561676])
at
org.apache.ofbiz.service.engine.GenericAsyncEngine.runAsync(GenericAsyncEngine.java:143)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.engine.GenericAsyncEngine.runAsync(GenericAsyncEngine.java:70)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runAsync(ServiceDispatcher.java:748)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runAsync(ServiceDispatcher.java:813)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runAsync(GenericDispatcherFactory.java:181)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.eca.ServiceEcaAction.runAction(ServiceEcaAction.java:131)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.eca.ServiceEcaRule.eval(ServiceEcaRule.java:160)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.eca.ServiceEcaUtil.evalRules(ServiceEcaUtil.java:191)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:514)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
~[ofbiz.jar:?]
at
org.apache.ofbiz.manufacturing.mrp.ProposedOrder.create(ProposedOrder.java:262)
[ofbiz.jar:?]
at
org.apache.ofbiz.manufacturing.mrp.MrpServices.executeMrp(MrpServices.java:816)
[ofbiz.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[?:1.8.0_312]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:1.8.0_312]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_312]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_312]
at
org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:100)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:415)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:70)
[ofbiz.jar:?]
at org.apache.ofbiz.service.job.AbstractJob.run(AbstractJob.java:87)
[ofbiz.jar:?]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[?:1.8.0_312]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[?:1.8.0_312]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
Caused by: org.apache.ofbiz.service.job.InvalidJobException: Unable to queue
job [createRequirementStatus.1643745561676]
at
org.apache.ofbiz.service.job.GenericServiceJob.deQueue(GenericServiceJob.java:151)
~[ofbiz.jar:?]
at org.apache.ofbiz.service.job.JobPoller.queueNow(JobPoller.java:173)
~[ofbiz.jar:?]
at org.apache.ofbiz.service.job.JobManager.runJob(JobManager.java:366)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.engine.GenericAsyncEngine.runAsync(GenericAsyncEngine.java:141)
~[ofbiz.jar:?]
... 26 more
2022-02-01 11:59:21,680 |OFBiz-JobQueue-47 |TransactionUtil
|W| Active transaction marked for rollback in place, so no transaction begun;
this stack trace shows when the exception began:
java.lang.Exception: Tx Stack Placeholder
at
org.apache.ofbiz.entity.transaction.TransactionUtil.setTransactionBeginStack(TransactionUtil.java:718)
~[ofbiz.jar:?]
at
org.apache.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:148)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:323)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
[ofbiz.jar:?]
at
org.apache.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:70)
[ofbiz.jar:?]
at org.apache.ofbiz.service.job.AbstractJob.run(AbstractJob.java:87)
[ofbiz.jar:?]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[?:1.8.0_312]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[?:1.8.0_312]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
Regards,
Steven Payne
Inventory Control Coordinator