[resolved] Implicit tContextLoad, FileNotFound and dev/test/prod configurations

One Star

[resolved] Implicit tContextLoad, FileNotFound and dev/test/prod configurations

Hello,
I have a job developed in TOS 5.6.1 that used Implicit tContextLoad to load configuration from a "./configuration.properties" file. This file was present only in test and production environments but not in development, where the "default" contexts were used; when the job was run in the different environments, all worked.
Now, in TOS 5.6.2, in development environment an exception is raised:
Exception in component Implicit_Context_Regex
java.io.FileNotFoundException: .\configuration.properties

I'd like to restore the preceding behavior.
Thanks for your help.

Accepted Solutions
One Star

Re: [resolved] Implicit tContextLoad, FileNotFound and dev/test/prod configurations

Hi,
this solution can get around it, but it still remains a 5.6.2 bug to me.
Anyway, I realized that the exception raised is not blocking, so the job can be completed.
Thank you,

All Replies
Seven Stars

Re: [resolved] Implicit tContextLoad, FileNotFound and dev/test/prod configurations

Hi,
What are your Talend workspace full path and files full path ?
Can you post screeshots please ?
One Star

Re: [resolved] Implicit tContextLoad, FileNotFound and dev/test/prod configurations

My Talend workspace path is "C:\Users\ruggero.dambra\Documents\Sviluppo\Talend-5.6".
The file configuration.properties (only in test and production environments) is in the same directory where the <job>.jar files are deployed.
In the development environment I don't have any configuration file (I've never had with TOS 5.6.1).
I'm uploading the same 3 screenshots as before...    
Thanks,
Seven Stars

Re: [resolved] Implicit tContextLoad, FileNotFound and dev/test/prod configurations

In extra option, on main job, write absolute path to test if it's a relative path problem.
However, regardless of the environment, always use your configuration file to still works in the same way but change the content (may be empty).
One Star

Re: [resolved] Implicit tContextLoad, FileNotFound and dev/test/prod configurations

arnaudbroens wrote:
In extra option, on main job, write absolute path to test if it's a relative path problem.
However, regardless of the environment, always use your configuration file to still works in the same way but change the content (may be empty).

That's not my problem. In test and production I WANT to use "./configuration.properties" and it still works, because the file exists in the correct relative path.
My problem is that in my development environment the file MUST NOT exist and TOS 5.6.1 gracefully used default configuration, where TOS 5.6.2 raises the exception.
If I change to an absolute path, I will have problems (or at least unease), because I develop on Windows, but test and production are on Linux.
Seven Stars

Re: [resolved] Implicit tContextLoad, FileNotFound and dev/test/prod configurations

Ok, you can use contextStr to get the current context (development, test and production).
Arnaud
Seven Stars

Re: [resolved] Implicit tContextLoad, FileNotFound and dev/test/prod configurations

Hi,
Can we consider this topic as resolved ? If yes, can you prefix this title topic with [resolved] ?
Thanks,
Arnaud
One Star

Re: [resolved] Implicit tContextLoad, FileNotFound and dev/test/prod configurations

Hi,
this solution can get around it, but it still remains a 5.6.2 bug to me.
Anyway, I realized that the exception raised is not blocking, so the job can be completed.
Thank you,

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

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch