My job stops executing after just a few rows, but there are thousands
My job reads an Excel file and depending on various logic either updates or inserts records into several tables in a database.
After adding the middle stage (the one that outputs only to an Excel file for logging) to catch items with no "SOLid" but to try and match against names instead, the job just runs for a short amount of time and then stops running. I have never seen this before, what can the reason be? There is no error output either.
Thanks.
Hi
There should be an error output on console once the job has an exception/error or hang for ever. Please check if there is a logic error in job design.
Best regards
Shong
The console shows no error message until I switch between Debug and Basic Run, then this suddenly shows up at the bottom:
Job SugarCRMInsertMySQL ended at 15:28 16/02/2011. Column 'email_address' cannot be nullColumn 'email_address' cannot be nullColumn 'email_address' cannot be nullColumn 'email_address' cannot be null How can I find out which schema or tMap to solve this in?
So the problem seems to be in tMap_6 - I deleted that part and it now runs.
What I am trying to do in there is, before updating the two tables that handles email addresses, to tie the email address to a lead via a relation table called email_addr_bean_rel (the bean in this case being a lead, it's a SugarCRM thing). I have the lead id and the email address but I need to look up the email_address id first, which is what I try to do there - is there a better way to do this, maybe in the tMap_2 where I do all the other logic for the update?
It could ba a database locking problem. I once had a similar issue where I was reading a table then applying updates and the job would hang. My only solution was to output the updated to a file and then update the database from thhe file.
Ok, then the next question is how to insert a Commit in the middle of the workflow? I have only used the Commit component as a final stage of the flow.
Test if this is the problem first. Disable the bottom half of the updates and run to see if everything is processed, then if ok test bottom half. If they both work then there is a conflict when running together. You may need to to all the top half then do an on subjob ok to run the bottom half.