[resolved] Paramétrage du tSendMail

One Star

[resolved] Paramétrage du tSendMail

Bonjour,
J'ai : tMSSqlInput => tMap => tMSSqlOutput
|| on sub job error
||
tSendMail

Dans le corps du message du composant tSendMail, comment faire pour afficher toutes les données
que je vois apparaître dans la console?
Merci de votre aide
Moderator

Re: [resolved] Paramétrage du tSendMail

Hi aurelie2014,
Welcome to community!
This is an international forum and English is the language we use. Posting in English will allow you to get more visibility and more help. Thanks for your understanding!
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Paramétrage du tSendMail

Hello,
I:
tMSSqlInput => tMap => tMSSqlOutput
|| on sub job error
||
tSendMail
In the message body of the TSendMail component, how to display all the data that I see appear in the console?
Thank you for your help
One Star

Re: [resolved] Paramétrage du tSendMail

I have good English. I hope that you will understand me
Moderator

Re: [resolved] Paramétrage du tSendMail

Hi,
If I understand you well, it seems you are looking for a global variable of ERROR_MESSAGE.
To make it clear, I have designed a demo job: tfixedflow-->tlogrow
|
tsendmail
Please see my screenshots for details
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Paramétrage du tSendMail

Yes I think that it is the variable global error_message that I would want to post(show) in the body of the email ( tsendMail ).
But I do not know how to write it in the tSendMail
One Star

Re: [resolved] Paramétrage du tSendMail

When I parametrize the tSendMail (see capure screen) I recoit well the e-mail but without the error message of the console:
" Hello,
An error arose in the job of Talendnull "
One Star

Re: [resolved] Paramétrage du tSendMail

.
One Star

Re: [resolved] Paramétrage du tSendMail

Excuse I, but I do not manage to send you my screen shot
Moderator

Re: [resolved] Paramétrage du tSendMail

Hi,
For registered users, please click on "post reply" (not through the quick post"). Pay more attention on Limitation of Image Upload Section(Limits: 20 images per post, each image must be less then 1024x768 pixels and 200 KB, .png is preferred).
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Paramétrage du tSendMail

Quand je paramétrer la TSendMail (voir écran capure) je recoit bien l'e-mail mais sans le message d'erreur de la console: "Bonjour, Une erreur levai dans le travail de Talendnull "
Moderator

Re: [resolved] Paramétrage du tSendMail

Hi,
I have seen your screenshot.
Put string into tsendmail message body as follows:
"Hello the error message is "+((String)globalMap.get("tFixedFlowInput_1_ERROR_MESSAGE"))

What's your actual error of tMap in console?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Paramétrage du tSendMail

I obtain the same result(profit). I receives the email with " null " as error message
Moderator

Re: [resolved] Paramétrage du tSendMail

Hi,
What's the error message of tMap? java exception, or compile error?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Paramétrage du tSendMail

Here is the error message :
Démarrage du job OBJ_MESURES_METEO a 11:22 21/03/2014.
connecting to socket on port 3483
connected
Impossible d'insérer une ligne de clé en double dans l'objet 'dbo.OBJ_MESURES_METEO' avec un index unique 'PK_OBJ_MESURES_METEO'.
Exception in component tMap_4
java.lang.NullPointerException
at java.math.BigDecimal.add(Unknown Source)
at iac_dev.obj_mesures_meteo_1_2.OBJ_MESURES_METEO.tMSSqlInput_5Process(OBJ_MESURES_METEO.java:1807)
at iac_dev.obj_mesures_meteo_1_2.OBJ_MESURES_METEO.runJobInTOS(OBJ_MESURES_METEO.java:5527)
at iac_dev.obj_mesures_meteo_1_2.OBJ_MESURES_METEO.main(OBJ_MESURES_METEO.java:5327)
disconnected
Job OBJ_MESURES_METEO terminé à 11:22 21/03/2014.
Moderator

Re: [resolved] Paramétrage du tSendMail

Hi aurelie2014,
Try this solution to see if it is OK with you.
Using TalendHelpCenter:tLogcatcher to fetch set fields and messages from Java Exception, tDie and/or tWarn.
Please have a look at my screenshots
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Paramétrage du tSendMail

It works. It is great, thank you very much :-)
One Star

Re: [resolved] Paramétrage du tSendMail

In Java, what is that you know how we show in the tSendMail the message in the console in black :
" Impossible to insert a line of key in double(copy) into the object ' dbo. OBJ_MESURES_METEO ' with a unique(only) index ' PK_OBJ_MESURES_METEO ' "
Moderator

Re: [resolved] Paramétrage du tSendMail

Hi,
You can use a custom component called tRedirectOutput to redirect the entire message printed on the console to a text file, and send an email with the file if the job run fails, the job design looks like:
tFileInput--main--tFileOutPut
|
onsubjoberror
|
tSendmail
About tRedirectOutput component, please read this topic:
http://www.talendforge.org/forum/viewtopic.php?pid=108078#p108078.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Paramétrage du tSendMail

Hi,
Thank you for your answer.
I met u other problem, I added 4GO of RAM and 3 processors on the remote desktop. Then when I executed the job Talend, I obtain the following error:
"Exception in component tMSSqlOutput_3
java.sql.SQLException: Network error IOException: No buffer space available (maximum connections reached?): connect
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:410)
at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at iac_dev.alim_mesures_meteo_temp_1_0.Alim_Mesures_METEO_Temp.tFileInputDelimited_3Process(Alim_Mesures_METEO_Temp.java:1648)
at iac_dev.alim_mesures_meteo_temp_1_0.Alim_Mesures_METEO_Temp.runJobInTOS(Alim_Mesures_METEO_Temp.java:5992)
at iac_dev.alim_mesures_meteo_temp_1_0.Alim_Mesures_METEO_Temp.runJob(Alim_Mesures_METEO_Temp.java:5783)
at iac_dev.alim_mesures_meteo_1_0.Alim_Mesures_METEO.tFileList_1Process(Alim_Mesures_METEO.java:786)
at iac_dev.alim_mesures_meteo_1_0.Alim_Mesures_METEO.runJobInTOS(Alim_Mesures_METEO.java:3675)

at iac_dev.alim_mesures_meteo_1_0.Alim_Mesures_METEO.main(Alim_Mesures_METEO.java:3463)
Caused by: java.net.SocketException: No buffer space available (maximum connections reached?): connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:307)
at net.sourceforge.jtds.jdbc.SharedSocket.<init>(SharedSocket.java:257)
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:311)

Exception in component tRunJob_3
java.lang.RuntimeException: Child job running failed
at iac_dev.alim_mesures_meteo_1_0.Alim_Mesures_METEO.tFileList_1Process(Alim_Mesures_METEO.java:808)
at iac_dev.alim_mesures_meteo_1_0.Alim_Mesures_METEO.runJobInTOS(Alim_Mesures_METEO.java:3675)
at iac_dev.alim_mesures_meteo_1_0.Alim_Mesures_METEO.main(Alim_Mesures_METEO.java:3463)"

What is that you know the cause of this error?
Moderator

Re: [resolved] Paramétrage du tSendMail

Hi,
You'd better open a new topic for your further issue. It is convenience for us to follow up your topic.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Two Stars

Re: [resolved] Paramétrage du tSendMail

Hi! I'm reading this post and I'd like to use this solution to capture errors during job executing. My question is, how to connect the component tfixedflow? At the end of the job?
Thanks a lot
Moderator

Re: [resolved] Paramétrage du tSendMail

Hi caro_vm,
Could you give us more descrition about your job requirment? Why do you want to put tfixedflow component at the end of job?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.