One Star

Exception in component tFTPPut_1 java.lang.NullPointerException

Hi,
This is my design :
https://www.talendforge.org/forum/img/members/373143/mini_talend1.png_20160429-0103.png

When i'm launching my job on windows everything is working
But if i build my job and launch the .sh on a linux server i have the following error :

Exception in component tFTPPut_1
java.lang.NullPointerException
        at rappro_sab_sage.rappro_bancaire_sab_sage_0_1.rappro_bancaire_sab_sage.tFTPPut_1Process(rappro_bancaire_sab_sage.java:2497)
        at rappro_sab_sage.rappro_bancaire_sab_sage_0_1.rappro_bancaire_sab_sage.tOracleInput_1Process(rappro_bancaire_sab_sage.java:2271)
        at rappro_sab_sage.rappro_bancaire_sab_sage_0_1.rappro_bancaire_sab_sage.tOracleConnection_1Process(rappro_bancaire_sab_sage.java:1443)
        at rappro_sab_sage.rappro_bancaire_sab_sage_0_1.rappro_bancaire_sab_sage.runJobInTOS(rappro_bancaire_sab_sage.java:3344)
        at rappro_sab_sage.rappro_bancaire_sab_sage_0_1.rappro_bancaire_sab_sage.main(rappro_bancaire_sab_sage.java:3090)

i'm pretty sure the tFTPConnection_1 is faulty because if i use tFTPPut without using an existing connection ( with context) it's working on linux.
But why on Windows i have no error?
Is there a way to solve this problem?

I would greatly appreciate any help or guidance you are able to give me
3 REPLIES
Community Manager

Re: Exception in component tFTPPut_1 java.lang.NullPointerException

Hi 
I don't think there is a connection issue, if tFTPConnection fails to connect to FTP, tFTPPut linked by onsubjobok will not be triggered. Perhaps the problem is related to context variable about Local repository and Remote directory. How do you change the value of context variable when the job is executed on Linux? For testing, I would suggest you to add a tJava in the beginning of job to print the value of context variables to see if the values are loaded correctly. 
Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Exception in component tFTPPut_1 java.lang.NullPointerException

Hi Shong,
Thank you for your reply.
For changing the value of context variable i edit the Default.properties file (i have a PATH environment variable on Windows and Linux)
 

I tried to display my context variables, all of them are correct on both windows and linux :
tjava :


Windows :

Linux :

What do you think?
One Star

Re: Exception in component tFTPPut_1 java.lang.NullPointerException

I still have the problem, does anyone have an idea?