Four Stars

[resolved] Null password error when running job from command line.

Hi ,
I have imported a Talend job from
(Version: 5.6.0M1 Build id: r118307-20140604-0708) to Talend 5.6 (Released version).
Now when I run this job from Talend studio it works fine. but, when I Build the job and run the same from command line. It gives me null password error. 
When I checked the Default.properties file , the password is not in plain text. This is creating issue when I change my database connection parameters in context file.
I have noticed the previous version of Talend used to generate password in paling text. 
The issue can be reproduced even creating a simple job in Talend 5.6 (Attached screenshot).
Request you to look into this issue.
Sincere thanks,
Sanket.
8 REPLIES
Moderator

Re: [resolved] Null password error when running job from command line.

Hi snaketmistry,
Your screenshot is missing. Could you please check it? How did you build job and run from commandline?
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.
Four Stars

Re: [resolved] Null password error when running job from command line.

 
Sorry missed the screenshot. 
1.)I have created a new job in Talend. 
2.) Right click on Job-->Build Job. Selected all options. It created the zip file.
3.) Extract the zip file. Modified the Default.properties.  What I have found that in the file, the password was not in plain text. I just changed it to plain text. (The older version of talend treats Password as plain text in Default.properties file.)
Run the batch file which is created by Talend. It throws the error 
context.db_Password::null
context.db_ServiceName::VSND
context.db_Login::hudda
Exception in component tOracleConnection_1
java.lang.NullPointerException
        at java.util.Hashtable.put(Unknown Source)
        at snts_loader.test_0_1.test.tOracleConnection_1Process(test.java:563)
        at snts_loader.test_0_1.test.tJava_1Process(test.java:464)
        at snts_loader.test_0_1.test.runJobInTOS(test.java:978)
        at snts_loader.test_0_1.test.main(test.java:805)
Four Stars

Re: [resolved] Null password error when running job from command line.

Any update on this request?
Thanks,
Sanket.

Re: [resolved] Null password error when running job from command line.

Hi Sanket,
Can you please change the datatype of password in context from "password" to "String" and try once? Thank you.
Regards
Srikanth
Four Stars

Re: [resolved] Null password error when running job from command line.

Hi Srikanth,
The issue is not using the the "String". The issue is this feature was working fine in older version. 
When you have a password field as a context variable and if you build the job, the Default.properties file will show the password in plain text. Suddenly in this version the password changed to some binary. Now if you want to run this job from command line and want to change that context variable, it will fail and giving the null password error.
Thanks,
Sanket.
Four Stars

Re: [resolved] Null password error when running job from command line.

I have checked this behaviour in older version. It is totally different in 5.6. 

Re: [resolved] Null password error when running job from command line.

Can you please share what are the differences you have seen?
Four Stars

Re: [resolved] Null password error when running job from command line.

Let's say you have a context variable "db_password" with Password type. Assign the value (say "test" to that variable. It will be masked in talend and displayed as ***
db_apssword = "test"
When you build the job and look into Default.properties. 
In older version: You will see the value in plain text (as above).
In 5.6: You will see the value in in binary (db_apssword = 4e7f142620180eb6) 
I have raised the bug from where you can download the sample job which I have attached.