Six Stars

Null pointer error with SCD component before data arrives

Using Talend Open Studio 6.4.0 I am trying to make use of the tMysqlSCD component. When I run the job I immediately get a null pointer error, even when no rows have been ingested or processed through the job. 

My input doesn't have null values for the primary key and the surrogate key is generated by talend based on the settings of the SCD component

The job has 2 sql connections to read main and lookup flows from a staging database and then write to a data mart using SCD

Exception in component tMysqlSCD_1 (jobname) 
java.lang.NullPointerException at projectworkspace.jobname_version.jobname.tMysqlInput_1Process(jobname.java:2288)
at projectworkspace.jobname_version.jobname.tMysqlConnection_1Process(Researcher_Dimension.java:687)
at projectworkspace.jobname_version.jobname..runJobInTOS(Researcher_Dimension.java:5741)
at projectworkspace.jobname_version.jobname..main(Researcher_Dimension.java:5502)

Is there something obvious I am missing 

 

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Six Stars

Re: Null pointer error with SCD component before data arrives

thanks @cterenzi and @xdshi

The before picture, I had the connections set on Component Ok because I assumed it would validate the connection (never really considered it a subjob)

tMysqlSCDBefore.png

The After Picture

Job runs without null pointer on SCD

tMysqlSCDAfter.png

4 REPLIES
Ten Stars

Re: Null pointer error with SCD component before data arrives

Just guessing since I can't see your job layout, but does your tMysqlSCD component rely on a tMysqlConnection component for its connection? If so, you have to ensure that the connection component executes before subsequent components. You can do this with a trigger link (OnSubjobOK) or by attaching the connection component to a tPrejob component.
Moderator

Re: Null pointer error with SCD component before data arrives

Hi,

Could you please post your job setting screenshots on forum? Which will be helpful for us to address your issue.

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.
Six Stars

Re: Null pointer error with SCD component before data arrives

thanks @cterenzi and @xdshi

The before picture, I had the connections set on Component Ok because I assumed it would validate the connection (never really considered it a subjob)

tMysqlSCDBefore.png

The After Picture

Job runs without null pointer on SCD

tMysqlSCDAfter.png

Ten Stars

Re: Null pointer error with SCD component before data arrives

Glad your problem was fixed