java.lang.NullPointerException in TMap (value = 0 )

Seven Stars

java.lang.NullPointerException in TMap (value = 0 )

Hi, 

I get the error java.lang.NullPointerException because I have a field that contains 0 value(i think). However, I want to get this value so I don't want to filter the value=0. 

 

So to catch the error I added the component tLogRow like the screenshot below.

The type of field quality is Integer.

tLogRow print 1546 row with quality=0 after that the job is crashing.

Cap.PNG 

 


cap2.PNG

 

So I can't understand the cause of this problems and How can I resolve them? 

 Please help me! 

 

 

Best regards.

Four Stars

Re: java.lang.NullPointerException in TMap (value = 0 )

Check if your attributes aren't null. For example, for attribute value: row1.value!=null

Fifteen Stars TRF
Fifteen Stars

Re: java.lang.NullPointerException in TMap (value = 0 )

Hi,
0 is not null and it's not because you a 0 into a field that you have a java.lang.NullPointerException.
Carefully check for other fields which can be null and participate into expression into your tMap.
Strings are good candidates to generate this kind of error.

TRF
Seven Stars

Re: java.lang.NullPointerException in TMap (value = 0 )

Hi,

 

Thanks for your replay.

 

 

I've checked all the fields but still have the same problem. 

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.