[resolved] error with multiple tSendMails running simultaneously

One Star

[resolved] error with multiple tSendMails running simultaneously

Ok, I set all the variables in tSetGlobalVar_1 (image 4). And each tFileList_# & tSendMail_# pair are identical, except for the named enumerated variables (set in tSetGlobalVar_1) (images 3 and 5).

I'm only getting emails, indicating failures, for 11 of the 13 activated tSendMails. Since I know that none of the files I'm looking for exist, right now, I know I should be getting 13 emails.
Also, it varies which tSendMail_# component throws the error - which makes me think that two of the tSendMail components are trying to run at the exact same time, which is causing one of them to fail.

this is the error I'm getting (image 2), when the job actually completes:
Exception in component tSendMail_11
java.lang.NullPointerException
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:595)
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:555)
at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:91)
at notifications.imdi_bb_batch.IMDI_BB_Batch.tSendMail_11Process(IMDI_BB_Batch.java:859)
at notifications.imdi_bb_batch.IMDI_BB_Batch.tFileList_11_error(IMDI_BB_Batch.java:139)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at notifications.imdi_bb_batch.IMDI_BB_Batch$TalendException.printStackTrace(IMDI_BB_Batch.java:97)
at notifications.imdi_bb_batch.IMDI_BB_Batch$15.run(IMDI_BB_Batch.java:3658)
Job IMDI_BB_Batch ended at 17:05 01/04/2008.

Also, occasionally I'll get this set of errors, and the job won't end, I have to kill it to get it to stop. (image 6)
?
Exception in component tSendMail_13
java.lang.NullPointerException
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:595)
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:555)
at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:91)
at notifications.imdi_bb_batch.IMDI_BB_Batch.tSendMail_13Process(IMDI_BB_Batch.java:1315)
at notifications.imdi_bb_batch.IMDI_BB_Batch.tFileList_13_error(IMDI_BB_Batch.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at notifications.imdi_bb_batch.IMDI_BB_Batch$TalendException.printStackTrace(IMDI_BB_Batch.java:97)
at notifications.imdi_bb_batch.IMDI_BB_Batch$17.run(IMDI_BB_Batch.java:3730)
Exception in component tSendMail_14
java.lang.NullPointerException
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:595)
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:555)
at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:91)
at notifications.imdi_bb_batch.IMDI_BB_Batch.tSendMail_14Process(IMDI_BB_Batch.java:1543)
at notifications.imdi_bb_batch.IMDI_BB_Batch.tFileList_14_error(IMDI_BB_Batch.java:196)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at notifications.imdi_bb_batch.IMDI_BB_Batch$TalendException.printStackTrace(IMDI_BB_Batch.java:97)
at notifications.imdi_bb_batch.IMDI_BB_Batch$18.run(IMDI_BB_Batch.java:3766)
Exception in component tSendMail_10
java.lang.NullPointerException
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:595)
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:555)
at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:91)
at notifications.imdi_bb_batch.IMDI_BB_Batch.tSendMail_10Process(IMDI_BB_Batch.java:631)
at notifications.imdi_bb_batch.IMDI_BB_Batch.tFileList_10_error(IMDI_BB_Batch.java:120)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at notifications.imdi_bb_batch.IMDI_BB_Batch$TalendException.printStackTrace(IMDI_BB_Batch.java:97)
at notifications.imdi_bb_batch.IMDI_BB_Batch$14.run(IMDI_BB_Batch.java:3622)
?
Exception in thread "Thread-11" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at notifications.imdi_bb_batch.IMDI_BB_Batch$25.run(IMDI_BB_Batch.java:4024)
Exception in thread "Thread-12" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at notifications.imdi_bb_batch.IMDI_BB_Batch$26.run(IMDI_BB_Batch.java:4060)
Exception in thread "Thread-0" java.lang.NullPointerException
at notifications.imdi_bb_batch.IMDI_BB_Batch$14.run(IMDI_BB_Batch.java:3636)
Exception in thread "Thread-4" Exception in thread "Thread-7" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at notifications.imdi_bb_batch.IMDI_BB_Batch$21.run(IMDI_BB_Batch.java:3880)
Exception in thread "Thread-10" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at notifications.imdi_bb_batch.IMDI_BB_Batch$24.run(IMDI_BB_Batch.java:3988)
Exception in thread "Thread-9" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at notifications.imdi_bb_batch.IMDI_BB_Batch$23.run(IMDI_BB_Batch.java:3952)
Exception in thread "Thread-8" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at notifications.imdi_bb_batch.IMDI_BB_Batch$22.run(IMDI_BB_Batch.java:3916)
java.lang.NullPointerException
at notifications.imdi_bb_batch.IMDI_BB_Batch$18.run(IMDI_BB_Batch.java:3780)

I will get both types of errors in sucessive runs, when no changes have been made to the job.

Accepted Solutions
Community Manager

Re: [resolved] error with multiple tSendMails running simultaneously

Hi
SSIS has a component they call a "Sequence Container," is there anything like that in TOS? Because, if there was, I think it'd be easy to make sure the tSetGlobalVar was complete before anything else ran.

Yes, you can run jobs in Sequence using tRunJob components and pass parameters from father job to child job in Talend.
Read this 1918 to learn how to pass a parameter from father job to child job.
In your case, you can try to define the global variables in context.
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

All Replies
Community Manager

Re: [resolved] error with multiple tSendMails running simultaneously

Hello
Exception in component tSendMail_11
java.lang.NullPointerException

It should be a synchronous issue. Before running the tFileList, all the variables should be initialized.
You can try tSetGlobalVar--onSubjobOK-->tFileList-->tSendMail

Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] error with multiple tSendMails running simultaneously

It should be a synchronous issue. Before running the tFileList, all the variables should be initialized.

The weird thing about that error is that I get it after some of the other tFileList/tSendMail combos have been successful - which makes it seem, to me, like the variables are already initialized at that point, if the other components are running fine.
You can try tSetGlobalVar--onSubjobOK-->tFileList-->tSendMail

I tried that - the problem is that if one of the tFileList components fails, then all the others after it fail too.
SSIS has a component they call a "Sequence Container," is there anything like that in TOS? Because, if there was, I think it'd be easy to make sure the tSetGlobalVar was complete before anything else ran.
Community Manager

Re: [resolved] error with multiple tSendMails running simultaneously

Hi
SSIS has a component they call a "Sequence Container," is there anything like that in TOS? Because, if there was, I think it'd be easy to make sure the tSetGlobalVar was complete before anything else ran.

Yes, you can run jobs in Sequence using tRunJob components and pass parameters from father job to child job in Talend.
Read this 1918 to learn how to pass a parameter from father job to child job.
In your case, you can try to define the global variables in context.
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business