You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Vince Clark <vc...@globalera.com> on 2009/07/22 23:02:43 UTC

error handling in simple methods

I am importing a large amount of customer and order data. I am iterating thru the result set using the simple-method <iterate> tag and if I hit one bad record the whole job fails. How can I trap and log errors and continue? 


Vince Clark 
vclark@globalera.com 
(303) 493-6723 

Re: error handling in simple methods

Posted by David E Jones <de...@me.com>.
That sounds like the expected behavior when you are running in a  
transaction. If you don't want it to behave differently you can turn  
off the transaction stuff for the service engine and simple-method, or  
inside your loop call a service with require-new-transaction=true  
(just watch out when you do that one if you are modifying records you  
are iterating over, you may end up with a dead-lock, or if you're  
lucky then a more immediate db error).

-David


On Jul 22, 2009, at 3:02 PM, Vince Clark wrote:

> I am importing a large amount of customer and order data. I am  
> iterating thru the result set using the simple-method <iterate> tag  
> and if I hit one bad record the whole job fails. How can I trap and  
> log errors and continue?
>
>
> Vince Clark
> vclark@globalera.com
> (303) 493-6723