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,

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Nine 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 ?

4 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

Nine 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.