[resolved] Wrong path after building job (No such file or directory)

[resolved] Wrong path after building job (No such file or directory)

Hi,
Im currently facing a issue when trying to run a build ETL job from our server.
Job is running successfully from my local development machine, but when trying to run it from our production server, Im getting this error:

./sg_daily_pg_get_inc_media_run.sh
Exception in component tRedshiftInput_1
java.io.FileNotFoundException: /Users/oscar/app/Talend/TOS_DI-r111943-V5.4.1/workspace/redshift-jdbc.log (No such file or directory)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:207)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at java.io.FileWriter.<init>(FileWriter.java:78)
at guruinsights.sg_daily_pg_get_inc_media_0_1.sg_daily_pg_get_inc_media.tRedshiftInput_1Process(sg_daily_pg_get_inc_media.java:538)
at guruinsights.sg_daily_pg_get_inc_media_0_1.sg_daily_pg_get_inc_media.runJobInTOS(sg_daily_pg_get_inc_media.java:2184)
at guruinsights.sg_daily_pg_get_inc_media_0_1.sg_daily_pg_get_inc_media.main(sg_daily_pg_get_inc_media.java:2064)

It seems that after building the job, it still s looking for the redshift-jdbc.log in the same path that is in my local machine.
I check the project and job properties but I wasn't able to find a place where I can configure this path as a relative.
I will appreciate any help on this.
Thanks!!
Oscar

Accepted Solutions
Moderator

Re: [resolved] Wrong path after building job (No such file or directory)

Hi,
Thanks for your description.
You can set Context value in Log file path then edit the context parameters in your exported .sh file.
TalendHelpCenter:How to change context parameters in Jobs.
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.

All Replies
Moderator

Re: [resolved] Wrong path after building job (No such file or directory)

Hi,
Did you follow up document TalendHelpCenter:How to build Jobs to export your job script?
Bet 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.

Re: [resolved] Wrong path after building job (No such file or directory)

Hi Sabrina,
thanks for the fast answer.
Sorry I should had explain better before how I build the job Smiley Happy

It was build as a autonomous Job.
And using all the default values in the other options. Note that I was able to build jobs successfully in the past.

Now, going throw the job I realised the place where this path is hardcoded in the properties of the component tRedshiftInput_1 under "Advanced settings" in the "Log file" text box.
it contains the path "/Users/oscar/PGuru/app/Talend/TOS_DI-r111943-V5.4.1/workspace/redshift-jdbc.log" and its automatically filled when using the component.
I was able to solve changing this path manually and moving separately/manually the redshift-jdbc.log file to the server, but I think should be another way to solve it.
I will like to know if there are other ways to overcome this situation.
Thanks!!!
Oscar
Moderator

Re: [resolved] Wrong path after building job (No such file or directory)

Hi,
Thanks for your description.
You can set Context value in Log file path then edit the context parameters in your exported .sh file.
TalendHelpCenter:How to change context parameters in Jobs.
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.
One Star

Re: [resolved] Wrong path after building job (No such file or directory)

Hi,
I am facing the below error, Can you please let me know which settings I need to change in the Talend tool to resolve this issue. Thanks in advance.
Exception in component tRedshiftInput_1
java.io.FileNotFoundException: D:\gitRepo\redshift-jdbc.log (The device is not ready)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileWriter.<init>(Unknown Source)
Moderator

Re: [resolved] Wrong path after building job (No such file or directory)

Hi,
Have you tried to change the location of log file to see if it is working well? On which talend build version you got this 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.