[resolved] Null Pointer exception talend

One Star

[resolved] Null Pointer exception talend

I have a problem with a null pointer exception in tjava, the component take a of extract json that take his value of a trest compontent, but the web server return null

In tjava i use this code 

if(row1.success===ull){
globalMap.put("FetchJsonResponse",false);
}
else{
globalMap.put("FetchJsonResponse",row3.success);

}
but i obtain null pointer exception
Seventeen Stars

Re: [resolved] Null Pointer exception talend

hi


row1.success===ul 

 Smiley Happy 

row1.success==null 


regards
One Star

Re: [resolved] Null Pointer exception talend

No, i have this code 

if(((Integer)globalMap.get("tExtractJSONFields_1_NB_LINE"))==null){
((HashMap<String,Boolean>)context.infoFlussoBoolean).put("JsonResponse",false);
}
else{
((HashMap<String,Boolean>)context.infoFlussoBoolean).put("JsonResponse",input_row.success);
}

and after i obtain a null pointer exception
One Star

Re: [resolved] Null Pointer exception talend

I have a tExtractJson and after and tjava and in tJava i put the value of extract Json in a context variable
Moderator

Re: [resolved] Null Pointer exception talend

Hi gaiapuffo,

Could you please upload your whole job setting screenshots into forum so that we can address your issue quickly.

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] Null Pointer exception talend

One Star

Re: [resolved] Null Pointer exception talend


I have this situation and i have a error in tjavaRow2, in tjavaRow2 i have this code 
boolean assocation1;

String associazioneMessage=null;
Long nr;

if(associazioneMessage==null){
   
associazioneMessage="NULLO";

}else{

associazioneMessage=row3.message;

}
if(row3.assocation1==null){

 assocation1=false;

}else{

 assocation1=row3.assocation1;

}

if(row3.nr==null){

nr=Long.valueOf(0);

}else{

nr=row3.nr;

}



globalMap.put("assocation1", assocation1);
globalMap.put("associazioneMessage",associazioneMessage);
globalMap.put("nr",nr);
One Star

Re: [resolved] Null Pointer exception talend

the Job run and after in this point i have null pointer exception
One Star

Re: [resolved] Null Pointer exception talend

Resolved my colleague have a errore in a if row

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Have you checked out Talend’s 2019 Summer release yet?

Find out about Talend's 2019 Summer release

Blog

Talend Summer 2019 – What’s New?

Talend continues to revolutionize how businesses leverage speed and manage scale

Watch Now

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog