Six Stars

Null pointer execption

This is the error i am getting while running the job but i dont have any blank values.While converting from date to string format i am getting this error can somebody help me out in this.The error is as follows

 

java.lang.NullPointerException

at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1439)
at java.text.DateFormat.parse(DateFormat.java:364)
at routines.TalendDate.parseDate(TalendDate.java:881)
at routines.TalendDate.parseDate(TalendDate.java:839)
at testing.staging_population_2017_10_31_0_1.staging_population_2017_10_31.tMongoDBInput_3Process(staging_population_2017_10_31.java:6236)
at testing.staging_population_2017_10_31_0_1.staging_population_2017_10_31.tSetKeystore_2Process(staging_population_2017_10_31.java:16214)
at testing.staging_population_2017_10_31_0_1.staging_population_2017_10_31.runJobInTOS(staging_population_2017_10_31.java:16944)
at testing.staging_population_2017_10_31_0_1.staging_population_2017_10_31.main(staging_population_2017_10_31.java:16719)

1 ACCEPTED SOLUTION

Accepted Solutions
Eleven Stars

Re: Null pointer execption

first try to check not null value and then convert date to string.

Manohar B
3 REPLIES
Eleven Stars

Re: Null pointer execption

first try to check not null value and then convert date to string.

Manohar B
Eleven Stars

Re: Null pointer execption

@krengan21,did it help you?

Manohar B
Six Stars

Re: Null pointer execption

yes @manodwhb