Error when using "Use an existing connection" in job and scheduled in task scheduler

Highlighted
Five Stars

Error when using "Use an existing connection" in job and scheduled in task scheduler

Hi All,

 

I am using TOS 7.1.* and wanted to automate the ETL by using either task scheduler or Crontab .

 

I have a job which uses master connection (Use an existing connection) for the input and out put DB components.

 

When i build the job and schedule it in  task scheduler the execution fails, throwing error at the tdbinput (java.lang.NullPointerexception)

When the same job is schedule in  task scheduler excluding the master connection the execution is successful.

 

Can someone help me on how to run a job in task scheduler of job, having Use an existing connection check enabled.

 

Please refer to the below screenshot for reference.

 

Error.PNGJob_MasterConnection.PNG


Accepted Solutions
Nine Stars

Re: Error when using "Use an existing connection" in job and scheduled in task scheduler

You don't need all the links in blue

 

Prejob means : before doing anything, it will first create the connection

 

After the connection is created, you can simply use it

 

Talend Prejob.JPG

 

Regards
DGM
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

All Replies
Nine Stars

Re: Error when using "Use an existing connection" in job and scheduled in task scheduler

Hi
I think you are trying to use a connection that is not yet created.

I suggest :
Prejob--->_POS_MASTER_BLR_
.................. the rest of the job

Regards
DGM
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Eight Stars

Re: Error when using "Use an existing connection" in job and scheduled in task scheduler

Hi @pabburi ,

 

Please use a tPreJob->OnComponentOk-> Connection or ConnectionComponent->OnSubjobOk->DBInput Component.

 

Thanks and Regards,

Subhadip

Five Stars

Re: Error when using "Use an existing connection" in job and scheduled in task scheduler

@subhadip13 ,

 

Hi,

 

Your Answer holds good when i have single tdbinput connection with the tdbconnection.

 

But Unable to connect  multiple tdbinput's with single tdbconnection, as onsubjobok failes to connect to second tdbinput.

 

Is there any workaround or alternative to have tdbconnection to all tdbinput's in the JOB.

 

tDBConnection.PNG

Nine Stars

Re: Error when using "Use an existing connection" in job and scheduled in task scheduler

You don't need all the links in blue

 

Prejob means : before doing anything, it will first create the connection

 

After the connection is created, you can simply use it

 

Talend Prejob.JPG

 

Regards
DGM
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch