logMrpError in MrpServices exception

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

logMrpError in MrpServices exception

ggonzales
I was trying to execute an MRP in OFBiz (from trunk) and there must have been something missing in how I'm doing it because the MRP execution was going to MrpServices#logMrpError( String, String, GenericDelegator ). That's all right (still retracing my steps and researching) but then logMrpError itself was showing an error:

Message: Failure in create operation for entity [MrpEvent]: org.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:MrpEvent] ... (Column 'MRP_ID'  cannot accept a NULL value.))

And it's because of this line in MrpServices (lines 531-534):

GenericValue inventoryEventError = delegator.makeValue("MrpEvent", UtilMisc.toMap("productId", productId, "eventDate", eventDate, "mrpEventTypeId", "ERROR", "eventName", errorMessage));

which is trying to create an MrpEvent entity but passing in only a product id in the parameters map. I tried looking in JIRA if it's been filed already but it doesn't look like it. Should I go ahead and create an issue?

I have written a patch here which involves modifying the call in ProposedOrder.java as well, not sure about the external effects.

Thanks :)

Cheers,
Glenn
Reply | Threaded
Open this post in threaded view
|

Re: logMrpError in MrpServices exception

Jacopo Cappellato-3
Hi Glenn,

thanks for the report, I have committed some fixes in rev. 674084 and  
now it should work.

Cheers,

Jacopo


On Jul 4, 2008, at 2:27 PM, ggonzales wrote:

>
> I was trying to execute an MRP in OFBiz (from trunk) and there must  
> have been
> something missing in how I'm doing it because the MRP execution was  
> going to
> MrpServices#logMrpError( String, String, GenericDelegator ). That's  
> all
> right (still retracing my steps and researching) but then  
> logMrpError itself
> was showing an error:
>
> Message: Failure in create operation for entity [MrpEvent]:
> org.ofbiz.entity.GenericEntityException: Error while inserting:
> [GenericEntity:MrpEvent] ... (Column 'MRP_ID'  cannot accept a NULL  
> value.))
>
> And it's because of this line in MrpServices (lines 531-534):
>
> GenericValue inventoryEventError = delegator.makeValue("MrpEvent",
> UtilMisc.toMap("productId", productId, "eventDate", eventDate,
> "mrpEventTypeId", "ERROR", "eventName", errorMessage));
>
> which is trying to create an MrpEvent entity but passing in only a  
> product
> id in the parameters map. I tried looking in JIRA if it's been filed  
> already
> but it doesn't look like it. Should I go ahead and create an issue?
>
> I have written a patch  http://rafb.net/p/9VvaCM49.html here  which  
> involves
> modifying the call in ProposedOrder.java as well, not sure about the
> external effects.
>
> Thanks :)
>
> Cheers,
> Glenn
> --
> View this message in context: http://www.nabble.com/logMrpError-in-MrpServices-exception-tp18278503p18278503.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>