Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] How to handle NullPointerException for tFileCopy

Hi, 
How to handle NullPointerException for tFileCopy? 

0683p000009MFy2.png
Thanks

Labels (2)
1 Solution

Accepted Solutions
vapukov
Master II
Master II

You can use tFileExists and from it:
- variant 1 -  "run-if" trigger if file exists -> tFileCopy -> email
- variant 2 - 2 "run-if" triggers both from tFileExists, if file exists - first copy, second send email

View solution in original post

4 Replies
Anonymous
Not applicable
Author

can you please post the full error messages?
Anonymous
Not applicable
Author

[statistics] connecting to socket on port 3421
[statistics] connected
No match file exist!
[ERROR]: dicu_igatev1.d_s14_myresults_sppii_agency_code_0_1.D_S14_MYRESULTS_SPPII_AGENCY_CODE - tFTPPut_1 - No match file exist!
[FATAL]: dicu_igatev1.d_s14_myresults_sppii_agency_code_0_1.D_S14_MYRESULTS_SPPII_AGENCY_CODE - tFileCopy_1 null
Exception in component tFileCopy_1
java.lang.NullPointerException
at java.io.File.<init>(File.java:277)
at dicu_igatev1.d_s14_myresults_sppii_agency_code_0_1.D_S14_MYRESULTS_SPPII_AGENCY_CODE.tFileCopy_1Process(D_S14_MYRESULTS_SPPII_AGENCY_CODE.java:3887)
at dicu_igatev1.d_s14_myresults_sppii_agency_code_0_1.D_S14_MYRESULTS_SPPII_AGENCY_CODE.tFileList_1Process(D_S14_MYRESULTS_SPPII_AGENCY_CODE.java:3409)
at dicu_igatev1.d_s14_myresults_sppii_agency_code_0_1.D_S14_MYRESULTS_SPPII_AGENCY_CODE.tFTPPut_1Process(D_S14_MYRESULTS_SPPII_AGENCY_CODE.java:3154)
at dicu_igatev1.d_s14_myresults_sppii_agency_code_0_1.D_S14_MYRESULTS_SPPII_AGENCY_CODE.tMSSqlInput_1Process(D_S14_MYRESULTS_SPPII_AGENCY_CODE.java:2650)
at dicu_igatev1.d_s14_myresults_sppii_agency_code_0_1.D_S14_MYRESULTS_SPPII_AGENCY_CODE.tDB2Input_1Process(D_S14_MYRESULTS_SPPII_AGENCY_CODE.java:1747)
at dicu_igatev1.d_s14_myresults_sppii_agency_code_0_1.D_S14_MYRESULTS_SPPII_AGENCY_CODE.runJobInTOS(D_S14_MYRESULTS_SPPII_AGENCY_CODE.java:4395)
at dicu_igatev1.d_s14_myresults_sppii_agency_code_0_1.D_S14_MYRESULTS_SPPII_AGENCY_CODE.main(D_S14_MYRESULTS_SPPII_AGENCY_CODE.java:4229)
[statistics] disconnected           
Anonymous
Not applicable
Author

I have used tfileexist. There is no error yet. 
But, the other problem is user receive the email notification. Did you know to solve it? Thanks
vapukov
Master II
Master II

You can use tFileExists and from it:
- variant 1 -  "run-if" trigger if file exists -> tFileCopy -> email
- variant 2 - 2 "run-if" triggers both from tFileExists, if file exists - first copy, second send email