Exception in component tMap

One Star

Exception in component tMap

Hello,
My first job works.
I need to modified it to get more correct datas.
I change one think in the tMap and I get the following error. I don't understand why:
Starting job personnel at 16:12 22/05/2008.
Exception in component tMap_4
java.lang.NullPointerException
at hrv_reso_foederis.personnel.personnel.tOracleInput_3Process(personnel.java:917)
at hrv_reso_foederis.personnel.personnel.runJobInTOS(personnel.java:2111)
at hrv_reso_foederis.personnel.personnel.main(personnel.java:2027)
Job personnel ended at 16:13 22/05/2008.
The input datas from row2 are
ETCMAT H1DDEB H1DFIN SADESO SADSOR
00010962|02/12/2002|29/02/2008|02/12/2002|29/02/2008
00460011|01/09/2007|29/02/2008|01/10/2001|29/02/2008
00010012|01/09/1997|29/02/2008|11/07/1997|29/02/2008
00320388|01/11/1997|09/03/2008|03/10/1994|09/03/2008
the output datas are:
ETCMAT SADESO H1DDEB H1DFIN SADSOR SACMSO ETCNOM ETCPRE ETCDNA
00320388|03/10/1994|01/11/1997|09/03/2008|09/03/2008|07|WOJCIESZAK|FRANCK|27/11/1969
00460011|01/10/2001|01/09/2007|29/02/2008|29/02/2008|07|LANGELLIER|MUGUETTE|17/01/1957
00010962|02/12/2002|02/12/2002|29/02/2008|29/02/2008|07|TEXIER|DAVID EMMANUEL|03/12/1972
00010012|11/07/1997|01/09/1997|29/02/2008|29/02/2008|07|ARZALIER|ALAIN|23/11/1955

I want to add: when SACMSO = '07' SADSOR must be null.
See the third figure...
Thanks.
One Star

Re: Exception in component tMap

Hi,
Your column is nullable ?
One Star

Re: Exception in component tMap

Hi,
yes the input SADSOR and SACMSO can be null.
In output it doesn't matter, it is a flat file!
Thanks
Community Manager

Re: Exception in component tMap

Hello
Exception in component tMap_4
java.lang.NullPointerException
yes the input SADSOR and SACMSO can be null.

You need to deal with the null value, for example:
SADMIN.SACMSO==null || SADMIN.SACMSO.equals("07")? null: SADMIN.SACMSO
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Exception in component tMap

With this expression it works:
SADMIN.SADSOR == null ? null :
(SADMIN.SACMSO.equals("") || SADMIN.SACMSO.equals("07") ? null : SADMIN.SADSOR)
Thanks
One Star

Re: Exception in component tMap

I Have the same problem, I have all my collumns with the process that you recomended but the problem continue.
Sixteen Stars

Re: Exception in component tMap

Can you show us a screenshot of how your tMap4 is configured OR provide us wirth all of the expressions you are using in the tMap?
One Star

Re: Exception in component tMap

@JPincay7, show us what's in your tMap.
Sound's like an autoboxing result. 
See http://programtalk.com/java/autoboxing-and-autounboxing/ and let us know.
Regards,
TRF