One Star

How to modify source code of a component?

have a job with multiple components. I would like to modify slightly the Java code of one of those components. Since I can not do it in TOS I am guessing I would have to export my job and make the changes, but this would mean I can't use TOS anymore for this job.
Is there a way I can change just the jave code for this one component but still use TOS to manage the job.
Thanks
5 REPLIES
Community Manager

Re: How to modify source code of a component?

Hello
To modify a component, go to plugins\org.talend.designer.components.localprovider_3.2.1.r31316\components, modify the componnet and then, pres ctrl+shift+f3 or restart TOS to reload the component.
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: How to modify source code of a component?

Hi
I have merged functionalities of tTeradataFastExport , tSCP, tSSH components for some purpose.
In xml of tTeradataFastExport for referring ganymed-ssh2.jar, added following lines:
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Java_SHH2" MODULE="ganymed-ssh2.jar" REQUIRED="true"/>
</IMPORTS>
</CODEGENERATION>
still on running this customized component, i get this error:
ch cannot be resolved to a type for this line:
ch.ethz.ssh2.Connection conn_tTeradataFastExport_1 = new ch.ethz.ssh2.Connection("xxxxxxxxx", "00");
can anyone provide pointers on this. I guess, this error is because of jar file.
Am I missing something else.
Regards
Manisha
One Star

Re: How to modify source code of a component?

Hi
I have merged functionalities of tTeradataFastExport , tSCP, tSSH components for some purpose.
In xml of tTeradataFastExport for referring ganymed-ssh2.jar, added following lines:
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Java_SHH2" MODULE="ganymed-ssh2.jar" REQUIRED="true"/>
</IMPORTS>
</CODEGENERATION>
still on running this customized component, i get this error:
ch cannot be resolved to a type for this line:
ch.ethz.ssh2.Connection conn_tTeradataFastExport_1 = new ch.ethz.ssh2.Connection("xxxxxxxxx", "00");
can anyone provide pointers on this. I guess, this error is because of jar file.
Am I missing something else.
Regards
Manisha
One Star

Re: How to modify source code of a component?

Hi
I have merged functionalities of tTeradataFastExport , tSCP, tSSH components for some purpose.
In xml of tTeradataFastExport for referring ganymed-ssh2.jar, added following lines:
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Java_SHH2" MODULE="ganymed-ssh2.jar" REQUIRED="true"/>
</IMPORTS>
</CODEGENERATION>
still on running this customized component, i get this error:
ch cannot be resolved to a type for this line:
ch.ethz.ssh2.Connection conn_tTeradataFastExport_1 = new ch.ethz.ssh2.Connection("xxxxxxxxx", "00");
can anyone provide pointers on this. I guess, this error is because of jar file.
Am I missing something else.
Regards
Manisha
One Star

Re: How to modify source code of a component?

Hi
I have merged functionalities of tTeradataFastExport , tSCP, tSSH components for some purpose.
In xml of tTeradataFastExport for referring ganymed-ssh2.jar, added following lines:
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Java_SHH2" MODULE="ganymed-ssh2.jar" REQUIRED="true"/>
</IMPORTS>
</CODEGENERATION>
still on running this customized component, i get this error:
ch cannot be resolved to a type for this line:
ch.ethz.ssh2.Connection conn_tTeradataFastExport_1 = new ch.ethz.ssh2.Connection("xxxxxxxxx", "00");
can anyone provide pointers on this. I guess, this error is because of jar file.
Am I missing something else.
Regards
Manisha