Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
sbhadra
Contributor II
Contributor II

Getting Null Pointer Exception

Hi Team,

 

I am trying to copy some files which are present in different paths to one directory and then attach that directory and send an email.0683p000009MaJ6.jpg

The files are getting copied to intended location however after that it is throwing an null pointer exception in the toracleinput component. I have put an iterator to ensure that all the files locations are being iterated and all the files are being copied.

  • Please suggest if any changes needs to be done in the design if I want to copy some multiple files from different location where location values are being fetched from the database and then attach all the files into email.

 

  • Also, if there are no rows fetched in the query no email should be sent. I have attached a tDie component over there with a condition (Integer)globalMap.get("tOracleInput _1_ NB_LINE") == 0. Will that be fine enough.

Please have a loo and suggest

Labels (2)
6 Replies
sbhadra
Contributor II
Contributor II
Author

Hi Team,

 

Any suggestion will be really appreciated.

manodwhb
Creator III
Creator III

@sbhadra, can you your job design? show the error where are you getting?

sbhadra
Contributor II
Contributor II
Author

Hi Manhor,

 

As I already mentioned when my query runs I am able to get some location details. Using tFileCopy I am copying some files into one location and then trying to send the files present in that location. When I am running the job till file copy it is working fine however, after that it is throwing null pointer exception in toracleinput (query) component. What I feel while executing onSubJobOk it is failing. Please suggest is it the correct way to design the job.

0683p000009MaK4.jpg

 

Also please suggest if there are no records fetched tDie component would work. I have put a condition (Integer)globalMap.get("tOracleInput _1_ NB_LINE") == 0 

Please suggest

manodwhb
Creator III
Creator III

@sbhadra , take runif from tfilecopy and connect to email body component and give ru if condition like  (Integer)globalMap.get("tOracleInput _1_ NB_LINE") > 0 

manodwhb
Creator III
Creator III

@sbhadra , I belive you were getting Null Pointer Exception in tSetglobvar because when there is no data. 

sbhadra
Contributor II
Contributor II
Author

Hi Manohar,

 

I don't have a single file which needs to be sent through email. There are multiple files hence, when all the files are getting copied I am trying to send the email. However, after all the files are copied I am getting a null pointer exception.