NullPointerException

Five Stars

NullPointerException

Hi there,

 

Not even sure if this is the correct location for the problem I'm facing.

Thing is that I finally managed to install Talend and right away was presented a task that has to be finished asap.

A collegue left us for holidays with a job I was supposed to be able to use.

I am completely new to Talend or programms like it.

 

Imported the job and the file that needs to be imported but keep on getting 'nullpointerexeption' errors when running the job.

 

Anybody knows what I can do about it?

What is the exact problem and what is the solution?

 

Thanx,

Esther.

 

 

Six Stars Moe
Six Stars

Re: NullPointerException

Usually it says which line, switch to code view and it will tell you which line is causing it.
Five Stars

Re: NullPointerException

I'll go and check it out...

Wow, that's an enormous ammount of text.
Any hints as to what to look for exactly... coz no doubt it's in here somewhere but nothing really stands out for me.
Six Stars Moe
Six Stars

Re: NullPointerException

Just go to the line, if it says it is in line 845, in the code viewer you go to line 845, for example it might say: Integer.valueOf(X)...
In this case you just have to switch back to design view and go to tmap and see where you wrote it, and put if x is null put 0 else convert to integer this way you will handle null values of x before conversion, (this is just an example to illustrate).
Five Stars

Re: NullPointerException

So, if I understand you correctly, the number I find in the error log (like for instance org.talend.daikon.di.DiIncomingSchemaEnforcer.put(DiIncomingSchemaEnforcer.java:318)
I then have to check line 318.
Six Stars Moe
Six Stars

Re: NullPointerException

Yes.
Five Stars

Re: NullPointerException

super newby:

I don't know where I can find the line #'s
I see my errors and the (line) numbers but where/how in the code view do I know what the corresponding lines are?
Six Stars Moe
Six Stars

Re: NullPointerException

When you switch from designer to Code, if the line numbers are not shown on the left side, just right click on the grey area on the left side and choose show line numbers.
Five Stars

Re: NullPointerException

Wow, kinda feel dumb ;-) but hey, you don't know what you don't know.

Thanx!

That line (318) says this: } else {
And I don't know how much of the surrounding lines I should show you, to check of you can tell what's wrong.
Seven Stars

Re: NullPointerException

It would be hard to detect what is causing the NPE (b/c it is a runtime exception) w/o some more context of your job.  Do you have any more screenshots of your job and the config of components throwing that exception (tSalesForceOutput_1 in this case)? Any upstream components that feed into that one would be helpful too as that is from where the null reference would originate.

Five Stars

Re: NullPointerException

Hi there,

 

here's some more context: