Getting "Error: factory already defined"

Six Stars SD
Six Stars

Getting "Error: factory already defined"

Hi: 

   I have a job that  first creates CSV file, taking records from database. And upon creation of the file, it calls a Talend component to call a API. When  I run this job, I get the error ""Error: factory already defined""

Then, I created the two seperate jobs  (  1) to create CSV files 2) to call the API with these CSV files) and from a master job I called these two jobs one after the other,  In that case also, I get the error " "Error: factory already defined".

 

If I run the job seperately, I am able to accomplish what I need to do.The first one creates multiple CSV files and second job picks up one at a time and calls the API.

Only when I run the steps one after another as part of same job OR as two jobs as part of master job, I get this error. What does this error mean and how can we resolve this.

Thanks,

 

 


Accepted Solutions
Highlighted
Ten Stars

Re: Getting "Error: factory already defined"

Assuming it has to do with instantiating declaration (or whatever its named), you've already did it once and doing it again (its the code generation not your fault)... so it fails because your master job generates code which implement / combine the two tRunJob components and some of your tJava code...

You could run them as "Use an independent process to run subjobs', it's a checkbox tRunJob component... 

 

Or is it something you try to achieve while making remote calls ... not a server response and your code something yourself to raise an error ?


All Replies
Moderator

Re: Getting "Error: factory already defined"

Hello,

Would you mind posting your job design 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 SD
Six Stars

Re: Getting "Error: factory already defined"

attaching the screenshots.

Thanks,

Soma

Highlighted
Ten Stars

Re: Getting "Error: factory already defined"

Assuming it has to do with instantiating declaration (or whatever its named), you've already did it once and doing it again (its the code generation not your fault)... so it fails because your master job generates code which implement / combine the two tRunJob components and some of your tJava code...

You could run them as "Use an independent process to run subjobs', it's a checkbox tRunJob component... 

 

Or is it something you try to achieve while making remote calls ... not a server response and your code something yourself to raise an error ?

Six Stars SD
Six Stars

Re: Getting "Error: factory already defined"

Thank you. I selected the option "Use an Independent process to run subjob" for the second job and seemed to work for now.

Thanks again.

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

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now